Home
Suva Programming
Home
SAP
Home
CPP
cpp program to show average of five integers
cpp program to show average of five integers
Suva Programming
Wednesday, January 29, 2020
Source Code:
#include<iostream>
using namespace std;
int main()
{
int A,B,C,D,E,sum;
float avg;
cout<<"Enter five integers: ";
cin>>A>>B>>C>>D>>E;
sum=A+B+C+D+E;
avg=float(sum)/5;
cout<<sum<<endl;
cout<<avg<<endl;
return 0;
}
Program Output:
Post a Comment
0 Comments
Categories
CPP
(64)
Java
(4)
Java Virtual Machine
(1)
SAP
(55)
Shell Programming
(4)
Popular Posts
SAP program to find the largest number out of three numbers
Tuesday, May 30, 2023
Contact Form
Name
Email
*
Message
*
0 Comments