Project: 1 : Guess The Number Game In C:

From the menu bar, click File > New > Project. In the Select a wizard window, expand C/C++, select C++ Project, and then click Next. In the Create a C++ Project window, in the Project name field, enter a name for the C++ project. From the Project type list, select Makefile Project/Empty Project, and then click Finish.

It was mainly developed as a system programming language to write an operating system. The main features of the C language include low-level memory access, a simple set of keywords, and a clean style, these features make C language suitable for system programmings like an operating system or compiler development.

int main() {
    int number, guess, nguesses=1;
    number = rand()%100+1;//Generates random number between 1 and 100.
    printf("The number is %d", number);
    //keep running the loop until the number is guessed.
        printf("guess the number between 1 to 100\n");
        scanf("%d", &guess);
            printf("Lower number please\n");
        else if(guess<number){
            printf("higher number please\n");
            printf("You guessed it in %d attempts\n", nguesses);
    } while (guess!=number);
    return 0;

Leave a Reply

For News Subscribe Us!

Can curiosity may end shameless explained. True high on said mr on come. An do mr design at little myself wholly entire though. Attended of on stronger or mr pleasure.

You have been successfully Subscribed! Ops! Something went wrong, please try again.

© 2022 Code With AM