| #include <iostream.h> void calc(float n1,float n2,float n3,float &total,float &product) { total=n1+n2+n3; product=n1*n2*n3; } void main() { float f1,f2,f3,sum,product; cout<<"enter 3 numbers"; cin>>f1>>f2>>f3; calc(f1,f2,f3,sum,product); cout<<"The sum of the numbers is "<<sum<<endl; cout<<"The product of the numbers is "<<product; } |