|
| makan007 (57) | |
| I would like to display as follows: Circle (4.67, 28.65, 66.75) ---------------------------- How do I cout using.... cout << "Circle: (" << 4.67 = radius 28.65 = circumference 66.75 = area Need to display these functions: double rad = radius(x1,y1,x2,y2); double cir = circumference(rad); double getArea = area(rad); | |
| kempofighter (657) | |
Did you try std::cout << "Circle: (" << rad << ", " << cir << ", " << getArea << ")" << std::endl; | |
| makan007 (57) | |
| Can you show in C++? | |
| makan007 (57) | |
| I tried your mtd. How come? But got this as output: Circle (Infinity, Infinity, Infinity) | |
| makan007 (57) | |
| Pls assist. | |
| firedraco (2592) | |
| FYI, that was C++. Your functions are probably incorrect, or you didn't initialize your variables correctly. | |
| makan007 (57) | |||
My former code:
| |||
| kempofighter (657) | |
| Well what's the problem? You are just output endl over and over. Use the line of code that I gave you and put it after you set the last variable in question. Step with the debugger and also verify that the values are correct. What data did you enter? Were the points valid? | |
| nemesiscplusplus (32) | |||
I think you just simply forgot to put std::cin.get(); in your codes.. So i think here it is..
Check it out :) Regards, Nemesis | |||
This topic is archived - New replies not allowed.
