Saturday, 4 October 2014

Write program to add two integer number in run time value

INPUT

#include<stdio.h>
#include<conio.h>

void main()

{
                int a,b,total;

                printf("Enter the value of a:");
                scanf("%d",&a);
                printf("Enter the value of b:");
                scanf("%d",&b);
                total=a+b;
                printf("The sum is %d",total);
                getch();
}

OUTPUT :

Enter the value of a: 4
Enter the value of b: 5
The sum is 9

 
 

No comments:

Post a Comment