Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.

Paste

Pasted as C by liran ( 16 years ago )
#include <stdio.h>

main()
{
      char name1[100];
      char lastname1[100];
      int age;
      
      printf("First tell me your name:");
      scanf("%s", &name1;);
      printf("Thanks, your name is %sn", name1);


      printf("Please tell me your last name:");
      scanf("%s", &lastname1;);
      printf("Thanks, your last name is %sn", lastname1);
      

      printf("Please tell me your age:");
      scanf("%d", &age;);
      printf("Thanks, your age is %dn", age); 
      

      printf("Thanks for the info, so your full name is %s %s and your age is %d", name1, lastname1, age);

      getch();
}

 

Revise this Paste

Your Name: Code Language: