Here's The Code In C To Add Two Numbers :
#include<stdio.h>
#include<conio.h>
void main()
{ int a,b,sum;
clrscr();
printf("Enter 1st Number: ");
scanf("%d",&a);
printf("Enter 2nd Number: ");
scanf("%d",&b);
sum=a+b;
printf("Sum Of 2 Numbers Is: %d",sum);
getch();
}
void main()
{ int a,b,sum;
clrscr();
printf("Enter 1st Number: ");
scanf("%d",&a);
printf("Enter 2nd Number: ");
scanf("%d",&b);
sum=a+b;
printf("Sum Of 2 Numbers Is: %d",sum);
getch();
}
No comments:
Post a Comment