Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //user input:-
- # include <stdio.h>
- int main()
- {
- char name[25];
- printf("What is your name?: ");
- scanf("%s", name);
- int age;
- printf("What is your age?: ");
- scanf("%d", &age);
- char grade;
- printf("What grade did you get?: ");
- scanf(" %c", &grade);
- printf("Your name is %s, aged %d and got a grade of %c", name, age, grade);
- // printf("my name is %s\n", name);
- // printf("i got %c grade\n", grade);
- // printf("you are %d years old\n",age);
- // char full_name[25];
- // printf("what is your full name?");
- // fgets(full_name,25,stdin);
- // printf("my name is %s",full_name);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement