Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Simple

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
maxuer
Newbie cheater
Reputation: 0

Joined: 07 Dec 2007
Posts: 20

PostPosted: Wed Jan 16, 2008 7:53 pm    Post subject: Simple Reply with quote

Nobody can show a code to create a basic game, like that you need say the correct number... Use language C++ PLZ
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Wed Jan 16, 2008 10:56 pm    Post subject: Reply with quote

Code:
#include <iostream>
#include <cstdlib>
#include <time.h>

int g;
int r;
int main(void)
{
   srand(time(0));
   r = rand() % 11; //0-10
   do{
      std::cout << "Guess a number, 0-10.\n";
      std::cin >> g;
      if (r < g){
         std::cout << "Lower!\n";         
      }
      else if (r > g){
         std::cout << "Higher!\n";         
      }
   }while (g != r);
   std::cout << "That's it!";

   return 0;
}


edit: argh.


Last edited by hcavolsdsadgadsg on Thu Jan 17, 2008 3:39 am; edited 1 time in total
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Thu Jan 17, 2008 2:36 am    Post subject: Reply with quote

^ Tut tut, return?
Back to top
View user's profile Send private message MSN Messenger
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Thu Jan 17, 2008 2:52 am    Post subject: Reply with quote

noz3001 wrote:
^ Tut tut, return?


Most compilers will compile that as is.

It's one of the great mysteries of the world.

_________________
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Thu Jan 17, 2008 3:36 am    Post subject: Reply with quote

oh shit how did that one slip by me

I FEEL LIKE I'VE LET EVERYONE DOWN, UGH
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites