HOW TO ADD TWO NUMBER WITH EXAMPLE.

HOW TO ADD TWO NUMBER WITH EXAMPLE.  

Today we will know how to add two number in c++ language with input .

so lets start ,




Example -2      

                            #include <iostream>
                             using namespace std;
                             int main() {
                              int a,b,sum;
                               cout<<"enter your first number :"
                               cin>>a;
                              cout<<"enter your second number :";
                              cin>>b;
                              sum=a+b;
                              cout<<"sum of two number is :"<<sum;
                                return 0;
                                        }


                             

Comments

Popular posts from this blog

In C++ Syntax

Add two number using class in c++ .

DATA types in C++ languages .