sum code

 #include<iostream>


using namespace std;

int main(){
    int a;
    int b;
    cout<<"enter the value of a :\n ";
    // <<this is insertion operator, >>this is extraction operator
    // cout is used for making an output, cin is used for extracting an input
    cin>>a;
    cout<<"enter the value of b :\n ";
    cin>>b;
    cout<<"the sum is "<<a+b;
   
    return 0;
}

Comments

Popular posts from this blog

Function Overloading in C++

oops recall, basic operations and nesting of member functions

OBJECT ORIENTED PROGRAMMING, classes public and private access modifiers (syntax)