program2 - /Tom Nanke /CIS 150-001 /10-9-07 /Program 2...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//Tom Nanke //CIS 150-001 //10-9-07 //Program 2 //This program is designed so that the computer has to figure out what number the user randomly picks at the beginning //of the program. The user picks a number between 1 and 100, which is the input. Then the computer has to figure out what //that number is. The computer does this by finding the middle of the possible range, outputting it as a guess, and having //the user tell the computer if it's guess is too high or too low. If the guess is too low then the computer will guess //higher, picking a number in the middle of the new range. This process keeps repeating until the computer reaches the //user's original number. Once the computer figures it out, the user will enter a value letting the computer know it //successfully found the user's number, and the computer will output a congratulatory note to itself. c #include <iostream> #include <time.h> #include <string> using namespace std; u int MAX=100; // the max of the range that the computer will use to do its
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

program2 - /Tom Nanke /CIS 150-001 /10-9-07 /Program 2...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online