A Simple Questionier Program
Write a program that asks a user to input his name, age, and marital status and displays the result.
/* A simple questioner program*/
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
char name [100];
char mari [50];
char yes;
int age;
/*Processing phase */
printf("\tThis Program helps catalog all your personal data.\n\n
\tPlease complete the following question\n" );
printf("Whats your name:");
scanf("%s", name);
printf("How old are you:");
scanf("%d", &age);
printf("Are you Married:");
scanf("%s", mari);
printf("Thanks for filling out the questionier:\n");
printf("Your name is:
%s\n", name);
printf("You are: %d\n", age);
printf("Marriage status: %s",mari);
return 0;
}
Comments
Post a Comment
Please feel free to comments if you have any ideas, questions and subjection concerning our post and programs