Subscribe For Free Updates!

We'll not spam mate! We promise.

Sunday, 26 August 2012

C++ code to display sum of five input intigers



//Sum of five input intigers
//Programmer name: Sohail ahmed
//Date:20/02/2010

#include<iostream.h>
#include<conio.h>

int main()
{
clrscr();

int num1, num2, num3, num4, num5;

cout<<"\nEnter 1st integer: ";
cin>>num1;
cout<<"\nEnter 2nd integer: ";
cin>>num2;
cout<<"\nEnter 3rd integer: ";
cin>>num3;
cout<<"\nEnter 4th integer: ";
cin>>num4;
cout<<"\nEnter 5th integer: ";
cin>>num5;

//Output of sum of 5 digits
cout<<"\nSum of 5 integers: ";
cout<<num1+num2+num3+num4+num5;
getch();
return 0;
}

Socializer Widget By CodingLovers
SOCIALIZE IT →
FOLLOW US →
SHARE IT →

0 comments:

Post a Comment