Add two Number
Program
#include<stdio.h>
void main()
{
printf("\nWelcome To Iot Project\n");
int a,b,sum;
printf("Enter 1st number=\n");
scanf("%d",&a);
printf("Enter 2nd Number=\n");
scanf("%d",&b);
sum=a+b;
printf("Sum of %d and %d = %d",a,b,sum);
}
Output
Welcome To Iot Project
Enter 1st number=12
Enter 2nd Number=4
Sum of 12 and 4 = 16
OR
Program
#include<stdio.h>
void main()
{
int num1,num2;
printf("\nWelcome To Iot Project\n");
printf("Enter Two Number\n");
scanf("%d%d",&num1,&num2);
printf("Add of Two Number=%d",num1+num2);
}
Output
Welcome To Iot Project
Enter Two Number
12
4
Add of Two Number=16
Comments
Post a Comment