write a program to input three numbers and find the sum, product and average.
TheImmortal49:
In which programming language??C++??
Answers
Answered by
21
class numbers {
public void display ()
{
int a, b, c,sum,product;
double avg;
a=5;
b=14;
c=18;
sum =a+b+c;
product =a*b*c;
avg =(a +b+c)/2;
System. out. println("the sum is :"+sum);
System. out. println("the product is :"+product);
System. out. println ("the average is :"+avg);
}
}
public void display ()
{
int a, b, c,sum,product;
double avg;
a=5;
b=14;
c=18;
sum =a+b+c;
product =a*b*c;
avg =(a +b+c)/2;
System. out. println("the sum is :"+sum);
System. out. println("the product is :"+product);
System. out. println ("the average is :"+avg);
}
}
Answered by
13
#include
using namespace std;
int main()
{
int a,b,c;
int s,p,a;
cout<<"Enter the numbers<cin>>a,b,c;
s=a+b+c;
p=a*b*c;
a=a+b+c/3;
cout<return 0;
}
Please mark as brainliest!!!
Hope this helps!!!
All the best!!!
using namespace std;
int main()
{
int a,b,c;
int s,p,a;
cout<<"Enter the numbers<cin>>a,b,c;
s=a+b+c;
p=a*b*c;
a=a+b+c/3;
cout<return 0;
}
Please mark as brainliest!!!
Hope this helps!!!
All the best!!!
Similar questions