Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- char firstName[20];
- char crush[20];
- int numberOfBabies;
- printf("What is your name? \n");
- scanf("%s", firstName);
- printf("Who are you going to marry? \n");
- //scanf() stops when it sees a space, so no last names
- scanf("%s", crush);
- printf("How many kids will you have? \n");
- //ampersand needed for everything but arrays
- scanf("%d", &numberOfBabies);
- printf("%s and %s are in love and will have %d babies", firstName, crush, numberOfBabies);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement