/******************************************************************************/ /* */ /* addnum.c : Program to add two number input by a user */ /* Author: Sanjiv K. Bhatia */ /* Date : June 18, 1996 */ /* */ /******************************************************************************/ #include <stdio.h> main() { int num1, num2; /* Two numbers input by the user */ printf ( "Running program to add two integers given by the user ...\n\n"); printf ( "Please enter two numbers separated by a blank: " ); scanf ( "%d%d", &num1, &num2 ); printf ( "The sum of %d and %d is %d\n", num1, num2, num1 + num2 ); exit ( 0 ); }