Sunday, January 2, 2011

Program to find out sum of any two integers.

/*
Name:  Program to find out sum of any two integers.
Author: Parveen Malik
Date: 02/01/11 16:05
*/

#include<stdio.h>
#include<conio.h>   // preprocessor section


void main()
{
int n1,n2,sum; //declare integers

printf("Enter any two integers \n");
scanf("%d%d",&n1,&n2); // for the user input

sum=n1+n2;

printf("\n\n%d + %d = %d",n1,n2,sum); // to print the sum


getch();
}


[caption id="attachment_11" align="aligncenter" width="655" caption="OUTPUT"]Program to find out sum of any two integers.[/caption]

0 comments:

Post a Comment