Thursday, December 25, 2008

A Program that will Find the Two Numbers Addition

First Method:

#include
Void main ()
{
int a, b, sum;
sum = a + b
printf ("Enter Two Numbers :\n");
scanf ("%d %d\n", & a, & b);
printf ("Sum of two Numbers: \n", sum);
}

Second Method:

#include
int main ()
{
int a, b, sum;
sum = a + b
printf ("Enter First Input:\n");
scanf ("%d\n", & a);
printf ("Enter Second Input:\n");
scanf ("%d\n", & b);
printf ("Sum is: \n", sum);
}

No comments: