Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void)
- {
- char first_initial;
- int last_char;
- puts("Enter first and last name");
- first_initial = getchar();
- while(getchar() != ' ');
- while((last_char = getchar()) != EOF && last_char != '\n')
- putchar(last_char);
- printf(", %c\n", first_initial);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement