home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 98.img / LCNOW2.ZIP / EXAMPLES / GREET.C < prev    next >
C/C++ Source or Header  |  1988-07-06  |  366b  |  19 lines

  1. /*
  2.  * G R E E T
  3.  *
  4.  * Get the user's name and print a personalized greeting.
  5.  */
  6.  
  7. main()
  8. {
  9.     char name[40];
  10.  
  11.     /* Prompt for and read the user's first name. */
  12.     printf("Enter your first name and press ENTER: ");
  13.     scanf("%s40", &name);
  14.  
  15.     /* Print the personalized greeting. */
  16.     printf("\nGreetings, %s.  Welcome to C programming!\n",
  17.            name);
  18. }
  19.