write a c++ program to read three integer numbers and compute and display there average
Answers
Answered by
11
Answer:
#include<iostream.h>
#include<conio.h>
void main( )
{
clrscr( );
int a,b,c;
float avg;
cout<<"Enter the value for a,b,c";
cin>>a>>b>>c;
avg = (a+b+c)/3;
cout<<"\n average="<<avg;
getch( );
}
Answered by
2
sum = num1 + num2 + num3
The average value is calculated by the sum of variables divided by the number of variables. Here, the number of variables is three. So, average = sum / 3 calculates the average value.
I HOPE IT IS HELPFUL TO YOU
Similar questions