Tag:Guessing games

  • Implementation of guessing games in C + +

    Time:2021-12-28

    Get a simple one today #include<stdio.h> #include<stdlib.h> #include<time.h> main() { int a,b; char c; srand(time(NULL)); a=1+(rand()%1000); Printf (“I have a number between 1 and 1000 \ n can you guess the number I want? \ n please enter your guess. \ n”); scanf(“%d”,&b); while(b!=-1) { if(b==a) { Printf (“correct answer \ ndo you want to […]