C++ Program to Add two Numbers

 

Program:-

                    Write a c++ program that inputs two numbers from user and adds these numbers then prints the sum of these numbers. 

Solution:-

Steps to write the program:
  1. Firstly Declare two variables of integer data type.
  2. Get input values from the user using cin>>.
  3. Declare the sum variable in which the sum is stored.
  4. Print the value of the sum variable.

Code Preview:-

 
            

Download code File:

                                                            Download link

Post a Comment

Previous Post Next Post