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

Info icon 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(){
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern