fork download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. char name[10];
  5. char lastname[20];
  6. int Age;
  7. float GPA;
  8.  
  9. printf("Enter name: ");
  10. scanf("%s", name);
  11. printf("Enter lastname: ");
  12. scanf("%s", lastname);
  13. printf("Enter Age: ");
  14. scanf("%d", &Age);
  15. printf("Enter GPA: ");
  16. scanf("%f", &GPA);
  17.  
  18. printf("name: %s\n", name);
  19. printf("lastname: %s\n", lastname);
  20. printf("Age: %d\n", Age);
  21. printf("GPA: %.2f\n", GPA);
  22. return 0;
  23. }
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
Enter name: Enter lastname: Enter Age: Enter GPA: name: 
lastname:  ��̾
Age: 5310
GPA: 0.00