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
(58)
Shell Programming
(4)
Popular Posts
SAP ABAP Program to find the largest number among three given numbers
Tuesday, October 29, 2024
Java Program to implement an interface structure
Monday, January 25, 2021
SAP Program to implement innerjoin between VBAK and VBAP standard table
Saturday, April 20, 2024
Contact Form
Name
Email
*
Message
*
0 Comments