Sum of Two Numbers in C++

Download
Download is available until [expire_date]
  • Version
  • Download 12
  • File Size 1.29 KB
  • File Count 1
  • Create Date April 17, 2016
  • Last Updated April 18, 2016

Sum of Two Numbers in C++

Sum of Two Numbers in C++
A very simple program in c++ that ask a user to enter two numbers and the program will compute and display the result.
Open the main.cpp in your preferred c++ ide.
Happy Programming!

Source code:

#include < iostream >

using namespace std;

int main()
{
    double firstnum, secondnum,sum;
    cout<<"Enter first number:"<>firstnum;
    cout<<"Enter second number:"<>secondnum;

    sum = firstnum + secondnum;
    cout<<"the sum of two numbers: "<< sum << endl;
    return 0;
}
, , , , , ,

Post navigation

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.