Mad Libs game in C programming

 #include <stdio.h>

#include <stdlib.h>


//making the mad libs game


int main()

{


    char color[20], pluralNoun[20], celebrityNameF[20], celebrityNameL[20];


//Let the user input the field

    printf("Enter Color:");

    scanf("%s", color);

    printf("Enter Plural Noun:");

    scanf("%s", pluralNoun);

    printf("Enter Celebrity Name:");

    scanf("%s%s\n", celebrityNameF, celebrityNameL);


//Print the output

    printf("Roses are %s.\n", color);

    printf("%s are blue.\n", pluralNoun);

    printf("I love %s %s\n.", celebrityNameF, celebrityNameL);


    return 0;

}


Comments

Popular posts from this blog

Using Struct C

arrays in c programming

for loop with index in C