Odigo
Gawd
- Joined
- Apr 22, 2002
- Messages
- 805
I'm creating a console application where you input a selection number (example: How many Apples do you want? Each cost $5.). I have everything working fine, and calculations are correction.. I'm using :
double Apple, Grapes, Total;
To calculate I'm doing:
Total = Apple * 5 + Grapes * 2;
While this works, I'm not sure if there is a better way to do this? It's a small program so this may be good enough.
double Apple, Grapes, Total;
To calculate I'm doing:
Total = Apple * 5 + Grapes * 2;
While this works, I'm not sure if there is a better way to do this? It's a small program so this may be good enough.