Program to let the user guess a number between 1 and 10 in C

#include <stdio.h>
int main()
int Magic=6, Guess;
   printf("Guess a number between 1 and 10: \n") ;
   scanf("%d",&Guess) ;
if( Guess==Magic)
        printf( " \nYour guess is correct. \n") ;
if( Guess! =Magic)
        printf( " \nYou have made a wrong guess. \n") ;
return 0;

Enjoyed this post? Share it!


Leave a comment

Your email address will not be published.