How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask LogicPro Your Own Question

LogicPro
LogicPro, Engineer
Category: Homework
Satisfied Customers: 12561
Experience:  Expert in Java C++ C C# VB Javascript Design SQL HTML
29751445
Type Your Homework Question Here...
LogicPro is online now
A new question is answered every 9 seconds

for LogicPro only. Dear LogicPro; I had wrote a program,

This answer was rated:

for LogicPro only.
Dear LogicPro;
I had wrote a program, but it not executed like the way I want it to do, it doesn't call the function to calculate for the result, can you help me to fix it before 10PM tonight?
This program is to allows user to find the area of a rectangle, area of a circle, or the volume of a cylinder, and allows the user to run the program as long as the user wishes.
#include
#include
#include
using namespace std;

const double PI = 3.1419; // constants for PI
// function call for area of rectangle
void Rectangle ();
// function call for area of circle
void Circle ();
// function call for volume of cylinder
void Cylinder ();
// functions to calculate for the result of choices
double Rectangle (double length,double width)
{
return length * width;
}
double Circle (double radius)
{
return PI * radius * radius;
}
double Cylinder (double radius,double height)
{
return PI * radius * radius * height;
}

int main()
{
// declare variables

double radius ;
double height ;
double length ;
double width ;
int choice;

cout << fixed << showpoint <<setprecision(2) << endl;
// Ask user to input choice to run the program
cout << "This program can calculate the area of a rectangle,"
"the area of the circle,or volume of a cylinder.";
cout << "To run the program enter: " << endl;
cout << "1: To find the area of rectangle." << endl;
cout << "2: To find the area of a circle." << endl;
cout << "3: To find the volume of a cyolinder." << endl;
cout << "-1: To end the program." <> choice; // get the choice option
cout << endl;

while (choice == -1)
{
switch (choice) // swith between choices
{
case 1:
cout <> length, width;
cout << endl;
cout << "Area = " << Rectangle(length,width) << endl;
break;
case 2:
cout <> radius;
cout << endl;
cout << "Area = " << Circle( radius) << endl;
break;
case 3:
cout <> radius >> height;
cout << endl;
cout << "Volume = " << Cylinder (radius,height);
cout << endl;
break;
default:
cout << "Invalid choice!" << endl;
}
}
cout << "To run the program enter: " << endl;
cout << "1: To find the area of rectangle." << endl;
cout << "2: To find the area of a circle." << endl;
cout << "3: To find the volume of a cyolinder." << endl;
cout << "-1: To end the program." <> choice;
cout << endl
return 0;
}
Hi,
Welcome back and thank you for asking me.

Please provide me complete requirements and the code you have.
If you have any file(s), Zip all files, upload the zipped file to http://wikisend.com and post download link here.
THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.
LogicPro and other Homework Specialists are ready to help you
Customer: replied 3 years ago.

Thanks, XXXXX XXXXX what I had missed now. will get back with you later if I get stuck on my home works.

I would be happy to help you.
Hello Lillie, How are you?
If you have other questions, You can ask me using "For LogicPro only" at the start of your questions to get instant answers.
It will ensure that question is for me.
Please bookmark my profile page:
http://www.justanswer.com/computer/expert-logicpro/
so you can come back and ask me a question anytime.

I would be happy to help you.

Related Homework Questions