CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

1. Junior Member
Join Date
Apr 2013
Posts
2

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.
Sample main
void main()
{
cout<< Quality_Point (92)<<endl;
cout << Distance(3.0,4.0,7.0,9.0)<<endl;
cout<< Multiply(2,7,4)<<endl;
}

2. Re: C++ Question help plz

Help with what? We won't write the functions for you. Please read this

http://forums.codeguru.com/showthrea...ork-assignment

If you have specific questions about using c++ then we'll provide guidance if you post your code.

3. Junior Member
Join Date
Apr 2013
Posts
2

Re: C++ Question help plz

Can u just plzz write the function and help me ,, then i will delete that that thread

4. Elite Member Power Poster
Join Date
Apr 1999
Posts
27,449

Re: C++ Question help plz

Originally Posted by o.m.a.r.941
Can u just plzz write the function and help me
Why? Isn't the goal to see if you know the material that was taught to you?

Seriously, the questions you asked could be completed in 10 to 15 minutes, 20 minutes at the most, by any good student.

Regards,

Paul McKenzie
Last edited by Paul McKenzie; April 30th, 2013 at 01:43 PM.

5. Re: C++ Question help plz

Originally Posted by o.m.a.r.941
Can u just plzz write the function and help me ,, then i will delete that that thread
That would be considered cheating as this is a homework assignment.

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•