home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / tyc / list21_1.c < prev    next >
C/C++ Source or Header  |  1993-10-16  |  244b  |  15 lines

  1.  /* Inputs a number and displays its square. */
  2.  
  3.  #include <stdio.h>
  4.  #include "calc.h"
  5.  
  6.  main()
  7.  {
  8.     int x;
  9.  
  10.     printf("Enter an integer value: ");
  11.     scanf("%d", &x);
  12.  
  13.     printf("\nThe square of %d is %ld.", x, sqr(x));
  14.  }
  15.