Console math problem!

Started by
38 comments, last by WaterMelon34 21 years ago
Silencer what ''duh..''? I did that already.
Advertisement
The platform-specific line system("pause"); can be used to stop the window from closing.
Duh was *I* forgot the &.

(silencer)
Lol, ok I found my Command Prompt by hitting Start > run "Command Prompt" and it works except that it doesn''t divide the answer by 2 which you should know you need to when doing area. Well so far I''m really happy. Thanks alot guys!
Since when do you need to divide by 2 when calculating the area of a rectangle? (That's what you mean by "area of 200 feet in length and width", right?)

Unless of course you actually meant the area of a triangle...

In case you don't know, the division operator in C++ is /

[edited by - micepick on March 31, 2003 7:03:26 PM]
I''m so happy. Ok, I''m in grade 6 and I''m doing area in math so I''ll use this program to do it for me! I''ll make it divide the answer myself and I just wanna thank you guys.
if you are using Dev-C++ do this to keep it from freezing.


    #include <stdio.h>#include <stdlib.h> // so u can use system ()int main ( ){// your code heresystem ("PAUSE"); // this causes the screen to pausereturn 0;}    



[edited by - Alpha_ProgDes on March 31, 2003 7:11:34 PM]

Beginner in Game Development?  Read here. And read here.

 

heh... grade 6? im in 12th grade, im gonna make a statistics package to do my AP stat homework for me...

i dont know why im posting... lol

Bungo!
Bungo!
Ok it doesn''t close by itself anymore because I listened to you and fixed it. And I meant all kinds of area cuz I''m doing all shapes. For rectangles I''ll just forget dividing it. It''s that simple.
Strange, I have a book about C++ and one of the example programs is almost exactly the same as your program.

This topic is closed to new replies.

Advertisement