Hello friend today i am back with other simple program of addition ..
coding is the amazing thing and i love to code and i want to share my work with you i hope you will like this..
[IMAGE: https://steemitimages.com/DQmbmJgEfKqumN9v2QUcrhEXqZM8ePU2mRjQG47gG7aJt8z/pr.PNG]
include< iostream>
using namespace std;
int main() // Main body of the program without with the program can,t be execute
{
int a , b , sum; // Initilizing values for sum
// a for the first integer value and b for the second integer value
cout<<"Enter values for addition "; // Cout statment is used to display the values of digits you writes on the screen
//Here i used this for the user to understand what to do.
cout<>a>>b; //Cin is use to take values form the user at run time.
sum = a + b; // taking the interger value for the addition
cout<<"Sum = "<<sum; // This cout statment is used for showing the answer saved in Sum
cout<<endl;
return 0; //I have used int with the main so now i have to return some intger values.
}
Result
[IMAGE: https://steemitimages.com/DQmQm5sa5M5kRYbGLjBX6we8NVevG5XFuUF8Z6a62JvetHy/ans.PNG]
a = 10
b = 20
sum = 30
Follow me for the more programs for your daily life