//Addition of two numbers
#include<stdio.h>
#include<conio.h>
void main()
{
int a, b, sum;//declaration of 3 integer variables a,b and sum
clrscr();
printf("Enter any two integer values\n");
scanf("%d%d",&a,&b);//Entry of 2 integer variables
sum = a + b;//sum of 2 variables a and b and result is stored in sum
printf("Sum of entered values = %d\n",sum);//printing of sum
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int a, b, sum;//declaration of 3 integer variables a,b and sum
clrscr();
printf("Enter any two integer values\n");
scanf("%d%d",&a,&b);//Entry of 2 integer variables
sum = a + b;//sum of 2 variables a and b and result is stored in sum
printf("Sum of entered values = %d\n",sum);//printing of sum
getch();
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.