fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.  
  5. int year;
  6. char initial1, initial2;
  7.  
  8. printf("Enter your birth year: ");
  9. scanf("%i ", &year);
  10. printf("\nEnter your initials: ");
  11. scanf("%c%c ", &initial1, &initial2);
  12. printf("\nYou were born in %d. ", year);
  13. printf("\nYour initials are %c %c \n", initial1, initial2);
  14.  
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 2296KB
stdin
1985
JC
stdout
Enter your birth year: 
Enter your initials: 
You were born in 1985. 
Your initials are J C