-
October 30th, 2004, 01:44 AM
#1
Member
More questions
Well, first off, when using the #define preproccessor in C++, can I keep it empty and fill it in later for an if-else statement block? Or do I have to fill them in right after declaring them?
Also, how would I set up my functions to do a math problem untill a certain result, printing the result given for each time it does the equation, untill it reaches that certain result, and then wait for the user to press a key before continuing?
Tell me if you think I\'m spamming or doing something stupid, please.
-
October 30th, 2004, 02:18 AM
#2
math problem:
let x = first number, let y = certain result...
[equation including x]
> if x != y > printf > loop > [equation including x]
> if x = y > printf > pause > end
hey, im not giving you the code when its that simple.... heh
[edit]Mathematical functions work just like in a calculator + - * / [/edit]
CTO
"Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction."
- Albert Einstein
-
October 30th, 2004, 03:29 AM
#3
Member
So it would be something like this?
Code:
if(x != y)
{
z = (x * y);
cout << "Current result: " << z << '\n";
}
else
{
cout << 'We're done! YOU WIN DA PRIZE!!!";
}
Tell me if you think I\'m spamming or doing something stupid, please.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|