I am new in C++ can you help me with my codes.
we need to create a game that has a level, timer and high scores those are the general requirements.
and this is what I have so far. and I think it is wrong.
can you please help me. This is for my finals in programming.
we need to create a game that has a level, timer and high scores those are the general requirements.
and this is what I have so far. and I think it is wrong.
can you please help me. This is for my finals in programming.
Code:
//WORD FINDER
#include <iostream>
#include <string>
using namespace std;
int main()
{
string first, second, third, fourth, fifth;
cout<<" WORD FINDER GAME"<<endl<<endl;
cout<<"Find the 5 words in 30 seconds."<<endl;
cout<<"Hint:FOOD!"<<endl<<endl;
cout<<" R H A M E I Z"<<endl;
cout<<" I O N Y N J Z"<<endl;
cout<<" C N P J D W U"<<endl;
cout<<" E E S O U P C"<<endl;
cout<<" M Y E C M X M"<<endl;
cout<<" U C H E E S E"<<endl;
cout<<" N F D U X V N"<<endl;
cout<<"Enter a word: ";
cin>>first;
if((first=="honey") || (first=="ham") || (first=="cheese") || (first=="rice") || (first=="soup"))
{
cout<<"Enter a word: ";
cin>>second;
}
if((first=="honey") || (first=="ham") || (first=="cheese") || (first=="rice") || (first=="soup"))
{
cout<<"Enter a word: ";
cin>>third;
}
if((first=="honey") || (first=="ham") || (first=="cheese") || (first=="rice") || (first=="soup"))
{
cout<<"Enter a word; ";
cin>>fourth;
}
if((first=="honey") || (first=="ham") || (first=="cheese") || (first=="rice") || (first=="soup"))
{
cout<<"Enter a word: ";
cin>>fifth;
}
if((first=="honey") || (first=="ham") || (first=="cheese") || (first=="rice") || (first=="soup"))
cout<<"You found the 5 words!";
return 0;
}
Comment