t805

Integer Multiplication

Sep 18th, 2013
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. /******************************************************************
  2.  Author: Sher D.
  3.  Date: 1 August 2013
  4.  Purpose: Product of two integers.
  5. ******************************************************************/
  6.  
  7. #include <stdio.h>
  8.  
  9. int main()
  10. {
  11.     int num1, num2;
  12.     int product;
  13.    
  14.     printf("Please enter the first integer: ");
  15.     scanf("%d%*c", &num1);
  16.    
  17.     printf("Please enter the second integer: ");
  18.     scanf("%d%*c", &num2);
  19.    
  20.     product = num1 * num2;
  21.    
  22.     printf("The product of the two numbers is: %d\n", product);
  23.    
  24.     return(0);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment