SIMPLE C & C++ PROGRAM TO ADD TWO NO.
C programm
#include<stdio.h>
void main()
{
int a,b,c;
printf("Enter the value of a");
scanf("%d",&a);
printf("Enter the value of b");
scanf("%d",&b);
c=a+b;
printf("\nThe value of a+b is=%d",c);
}
C++ programm
#include<iostream.h>
void main()
{
int a,b,c;
cout<<"Enter the value of a";
cin>>a;
cout<<"Enter the value of b";
cin>>b;
c=a+b;
cout<<"\nThe value of a+b is="<<c;
}
Thanks for visiting...................