12-05-2009, 08:20 AM
(This post was last modified: 12-05-2009, 08:53 AM by Brainless Control.)
Oh!,well that's ok I guess,not a big deal is it? :S
Calculator v1
|
12-05-2009, 08:20 AM
(This post was last modified: 12-05-2009, 08:53 AM by Brainless Control.)
Oh!,well that's ok I guess,not a big deal is it? :S
12-12-2009, 05:24 AM
Thank's Xenocide i will give a try later
12-24-2009, 08:01 AM
its easy to make but for a beginner its good
01-09-2010, 07:23 AM
Update:
Ok so I'm back from holidays,I was kinda bored today so I decided to add a goto statement in it to re-do the put new number thing and not exit and re-open the program to do it. Code: #include <iostream>
01-09-2010, 06:03 PM
(01-09-2010, 07:23 AM)Beta™ Wrote: I decided to add a goto statement No! Goto statements are considered bad practice in C++ because they cause spagetti-code. Use some other form of conditional statement where possible. Quote:The primary problem with goto is that it allows a programmer to cause the point of execution to jump around the code arbitrarily. This creates what is not-so-affectionately known as spaghetti code. Spaghetti code has a path of execution that resembles a bowl of spaghetti (all tangled and twisted), making it extremely difficult to follow the logic of such code. To read Dijkstra's paper, click here. The little boat gently drifted across the pond exactly the way a bowling ball wouldn't.
01-10-2010, 03:37 AM
Yeah I kinda know it's bad thing to use in your code but I couldn't find any other way.
Thanks for the link MrD. I'll read it.
What do you think about packing it into 2 function, void showMenu() and int Calculate()
Then you can use the while statement in the main function to loop whole day through your code.
01-10-2010, 05:48 AM
(This post was last modified: 01-10-2010, 05:49 AM by Brainless Control.)
Is it possible to do this?
Well it won't compile cause I'm getting only 1 error. Quote:error C2447: '{' : missing function header (old-style formal list?) Code: #include <iostream>
Here I don't have the time to debug your code, but I have an modification to offer you ;)
Compiled and works as you wanted it to! Code: #include <iostream>
01-10-2010, 06:05 AM
(This post was last modified: 01-10-2010, 06:05 AM by Brainless Control.)
(01-10-2010, 05:58 AM)Master of the Universe Wrote: Here I don't have the time to debug your code, but I have an modification to offer you ;)or that lol,very smart move |
« Next Oldest | Next Newest »
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Multi Purpose Calculator | Reality | 21 | 5,117 |
12-14-2010, 06:11 PM Last Post: Buzz Lightyear |
|
my own calculator | WHITE PANDA | 8 | 2,193 |
07-14-2010, 03:19 PM Last Post: Kondry |
|
Calculator in C | Liberty | 4 | 1,322 |
12-10-2009, 11:45 PM Last Post: Sagittarius |