Coding Practice: Write a program in C++ to calculate summation of 3 integer numbers

in WORLD OF XPILAR3 years ago

coding.jpg

Problem: Write a program in C++ to calculate the summation of following three integer numbers and display the result on computer screen display

5609
3865
1190

ok, this program demonstrates how to find out the sum of three integer numbers and print the result on computer screen".

So, let's do it --

//Write a program in C++ to calculate the summation of following three integer numbers and display the result on computer screen display

    //5609
    //3865
    //1190

//Programmed by Phantom

#include <iostream> //standard I/O (inout/output) stream link
using namespace std;
  
int main () //main function
{
    int numb1, numb2, numb3; //local variable declaration
    int sum;
    
    numb1 = 5609; //Assign value to first integer
    numb2 = 3865; //Assign value to second integer
    numb3 = 1190; //Assign value to third integer
    
    sum = numb1 + numb2 + numb3; //calculate summation of the given three integer numbers
 
    cout << "Summation of Integer numbers: " << numb1 << "+" << numb2 << "+" << numb3 << "=" << sum << endl ;

   return 0; //program executed successfully
} //End of program


Result

Summation of Integer numbers: 5609+3865+1190=10664

Do it yourself on online C++ compiler: https://www.tutorialspoint.com/compile_cpp_online.php

Or, download Turbo C++ (ver. 3.0)
Download Turbo C++ for Windows 7, 8, 8.1 and Windows 10 (32-64 bit) with full/window screen mode and many more extra feature

Tomorrow I'll post another C++ problem with solution.
Have a nice day.
Thank you very much.

Coin Marketplace

STEEM 0.17
TRX 0.13
JST 0.027
BTC 59079.50
ETH 2697.37
USDT 1.00
SBD 2.50