April 30th, 2013, 02:28 PM
C++ Question help plz
Write a c++ program that contain the following functions :
1) Function Quality_Point that takes one int argument (student_average) and return ‘A’ if the student_average between 90-100 and return ‘B’ if student_average between 80-89
2) Function Distance that takes 4 double argument (x1,y1,x2,y2) calculate and return the distance between (x1,y1) – (x2,y2). All numbers and return value should be of type double
(hint) use the following equation D= √(x1-x2)2+(y1-y2)2
(hint) use predefine functions pow(x, y)/ sqrt(x)
3) Function Multiply that takes three numbers and
returns the sum of the first two numbers multiplied by the third number.
(Assume that the three numbers are of type int.)
Write the definition of a function main that tests each of these functions.
cout<< Quality_Point (92)<<endl;
cout << Distance(3.0,4.0,7.0,9.0)<<endl;
Click Here to Expand Forum to Full Width