guess.c

# guess.c - guess.c CS50 Assignment 2 Created by Joseph Ekpo...

• Homework Help
• 2

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

// // guess.c // CS50 Assignment 2 // // Created by Joseph Ekpo on 10/1/16. /* Write a C program that plays a number guessing game with the user. Welcome to the game of Guess It! I will choose a number between 1 and 200. You will try to guess that number. If you guess wrong, I will tell you if you guessed too high or too low. You have 5 tries to get the number. OK, I am thinking of a number. Try to guess it. Your guess? 50 Too high! Your guess? 12 Too low! Your guess? 112 Too high! Your guess? 250 Illegal guess. Your guess must be between 1 and 200. Try again. Your guess? 30 **** CORRECT **** Want to play again? y Ok, I am thinking of a number. Try to guess it. Your guess? 58 **** CORRECT **** Want to play again? n Goodbye, It was fun. Play again soon. */ #include <stdio.h> #include <stdlib.h> int main(){

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

This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern