Here is the Beginning of C++ Program. Here you can see that you have to Declare the Variables for any Operation. In this Program we have three Variables a,b,c. Variable Basically provide a memory location where we can store the value. Variable can vary the values in execution time.
#include<iostream.h>
#include<conio.h>
void main()
{
int a,b,c;
cout<<"enter the value of a";
cin>>a;
cout<<"\n enter the values of b";
cin>>b;
c=a+b;
cout<<"\n the sum of two values is =";
cout<<c;
}
OUTPUT OF THIS PROGRAM IS
#include<iostream.h>
#include<conio.h>
void main()
{
int a,b,c;
cout<<"enter the value of a";
cin>>a;
cout<<"\n enter the values of b";
cin>>b;
c=a+b;
cout<<"\n the sum of two values is =";
cout<<c;
}
OUTPUT OF THIS PROGRAM IS
No comments:
Post a Comment