| | |
please help
![]() |
•
•
Join Date: Jul 2009
Posts: 1
Reputation:
Solved Threads: 0
i need ur help to write c++ porgram...
this is the topic of it
""""" Write a C++ program that calculates the perimeter and area of simple geometrical shapes based on the user’s selection. Let the program handle the perimeter and area calculations for circles, and Parallelograms. The program should display a menu of the three shapes, and then allow the user to select one of the options. Accordingly, the program would request from the user to enter the required parameters of the corresponding geometrical shape in floating-point form (e.g., radius of a circle). The program should interact with the user in a friendly way using a menu such as the following:
C: Circle.
P: Parallelogram.
The program should detect invalid inputs and display appropriate message to the user, accordingly. The following table describes the required parameters and the formulas for finding the perimeter and area for each shape.
Circle
Parallelogram
Parameters
Radius r
Sides S1 and S2
Angle α
Perimeter
2 π r
2(S1 + S2)
0 < α ≤ 90: (S1*S2)sinα
Area
π r2
90 < α ≤ 180: (S1*S2)sin(180-α)
Notes: S1 S2 H = S2 Sin α γ α
Assume π = 3.143;
Parallelogram Area = S1 * H = S1 * S2 * Sinγ
where, γ = 180 - α """
pleeeeeeeaaaassssssssssssse help
this is the topic of it
""""" Write a C++ program that calculates the perimeter and area of simple geometrical shapes based on the user’s selection. Let the program handle the perimeter and area calculations for circles, and Parallelograms. The program should display a menu of the three shapes, and then allow the user to select one of the options. Accordingly, the program would request from the user to enter the required parameters of the corresponding geometrical shape in floating-point form (e.g., radius of a circle). The program should interact with the user in a friendly way using a menu such as the following:
C: Circle.
P: Parallelogram.
The program should detect invalid inputs and display appropriate message to the user, accordingly. The following table describes the required parameters and the formulas for finding the perimeter and area for each shape.
Circle
Parallelogram
Parameters
Radius r
Sides S1 and S2
Angle α
Perimeter
2 π r
2(S1 + S2)
0 < α ≤ 90: (S1*S2)sinα
Area
π r2
90 < α ≤ 180: (S1*S2)sin(180-α)
Notes: S1 S2 H = S2 Sin α γ α
Assume π = 3.143;
Parallelogram Area = S1 * H = S1 * S2 * Sinγ
where, γ = 180 - α """
pleeeeeeeaaaassssssssssssse help
Welcome silent prince,
First, you have to read and follow the rules at daniweb.
1. Source code must be wrapped with bb code tags.
How to use bb code tags?
2. Homework rules.
First, you have to read and follow the rules at daniweb.
1. Source code must be wrapped with bb code tags.
How to use bb code tags?
2. Homework rules.
Failure is not fatal, but failure to change might be. - John Wooden
![]() |
Other Threads in the C++ Forum
- Previous Thread: std:string::find vs std::find
- Next Thread: How to call a class member function via function pointer in map [C++]
| Thread Tools | Search this Thread |
api array based binary bitmap business c++ c/c++ char class classes code coding commentinghelp compile console conversion count decide delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez graph guess gui homeworkhelp homeworkhelper iamthwee ifpug ifstream incrementoperators infinite input int integer java lib linkedlist linker loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem proficiency program programming project python random read recursion reference rpg string strings temperature template templates test text text-file tree url variable vector video win32 windows winsock word wordfrequency wxwidgets






