
I have been asked to write a programme that gets five values,gets the sum,average and product please help me on this.

#include <iostream.h>
#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
int a,b,c,d,e,sum;
float average;
long product;
cout << "Enter 5 integers : " << endl;
cin>>b>>b>>c>>d>>e;
sum=a+b+c+d+e;
average=sum/5;
product=a*b*c*d*e;
cout << "The sum is " << sum << "." << endl;
cout << "The average is " << average << "." << endl;
cout << "The product is " << product << "." << endl;
getch();
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.