468,306 Members | 1,120 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,306 developers. It's quick & easy.

Word Finder Game in c++/ PROGRAMMING(GAME)

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.

Expand|Select|Wrap|Line Numbers
  1. //WORD FINDER
  2. #include <iostream>
  3. #include <string>
  4. using namespace std;
  5. int main()
  6.  string first, second, third, fourth, fifth;
  7.  
  8.  cout<<"               WORD FINDER GAME"<<endl<<endl;
  9.  cout<<"Find the 5 words in 30 seconds."<<endl;
  10.  cout<<"Hint:FOOD!"<<endl<<endl;
  11.  cout<<"  R  H  A  M  E  I  Z"<<endl;
  12.  cout<<"  I  O  N  Y  N  J  Z"<<endl;
  13.  cout<<"  C  N  P  J  D  W  U"<<endl;
  14.  cout<<"  E  E  S  O  U  P  C"<<endl;
  15.  cout<<"  M  Y  E  C  M  X  M"<<endl;
  16.  cout<<"  U  C  H  E  E  S  E"<<endl;
  17.  cout<<"  N  F  D  U  X  V  N"<<endl;
  18.  
  19.  cout<<"Enter a word: ";
  20.  cin>>first;
  21.  
  22.  if((first=="honey") || (first=="ham") || (first=="cheese") || (first=="rice") || (first=="soup"))
  23.  {
  24.   cout<<"Enter a word: ";
  25.   cin>>second;
  26.  }
  27.  if((first=="honey") || (first=="ham") || (first=="cheese") || (first=="rice") || (first=="soup"))
  28.  {
  29.   cout<<"Enter a word: ";
  30.   cin>>third;
  31.  }
  32.  
  33.  if((first=="honey") || (first=="ham") || (first=="cheese") || (first=="rice") || (first=="soup"))
  34.  {
  35.   cout<<"Enter a word; ";
  36.   cin>>fourth;
  37.  }
  38.  
  39.  if((first=="honey") || (first=="ham") || (first=="cheese") || (first=="rice") || (first=="soup"))
  40.  {
  41.   cout<<"Enter a word: ";
  42.   cin>>fifth;
  43.  }
  44.  if((first=="honey") || (first=="ham") || (first=="cheese") || (first=="rice") || (first=="soup"))
  45.   cout<<"You found the 5 words!";
  46.  
  47.  
  48.  
  49.  
  50.  return 0;
  51. }
Sep 16 '13 #1
1 5035
weaknessforcats
9,207 Expert Mod 8TB
Actually, I haven't the time to debug your code and review your design. Debugging is a necessary part of development.

There is no way I can know if this code is right or wrong.
Sep 17 '13 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by wbmca | last post: by
8 posts views Thread by Summercool | last post: by
1 post views Thread by Netwatcher | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.