Can you people please tell me what you think about this "game"? It's a basic calculator done in Console. It was done in MSVC++ 6.0 Intro. Version. thanks.
P.S.: If alot of people like it (or atleast a majority), I'll release the source.
Can you people please tell me what you think about this "game"? It's a basic calculator done in Console. It was done in MSVC++ 6.0 Intro. Version. thanks.
P.S.: If alot of people like it (or atleast a majority), I'll release the source.
good job man
have a cout <<"\n"; after your options so the user choice isn't right under the options list
Thnx. Ok, thnx 4 the advice.Originally posted by Ride -or- Die
good job man
have a cout <<"\n"; after your options so the user choice isn't right under the options list
The reason i say this is to help make it flow better in terms of reading. I personaly would go one step further and have a prompt.
instead of
cout<<"\n";
u could use:
cout<<"\nEnter Choice: ";
they would see
Enter Choice:
Ok, here's the update. Just fixed what you said, and the version. I also added a title to it. Plus, the source is with it. Hopefully it'll help people out, or you people can help me out on how to optimize or whatnot (I'll give credit). Thanks.
my quick suggestion implemented: (i'll look it over carefully tommorow and see what i notice : ) )
Code:void begin() { system("cls"); header(); cout << "Welcome to Calculator v"<<calculator.version; cout << "."<<calculator.extension <<" "<<calculator.nversion<<"!\n"; cout << "\nPlease select an option:\n"; cout << "1] Multiply\n2] Divide\n3] Add\n4] Subtract\n5] Exit|Quit\n"; cout << "\nEnter Choice: "; //added by RoD cin >> pick.choice;
Thanks RoD, I'll add that.Originally posted by kermi3
Nice....now add factorial
Kermi3-->-->I'm workin on it! *j/p*. But yea, I'm gonna add more in tomorrow, and maybe it'll be better than micro$oft's calc....*come to think about it, counting w/ your fingers is better than using micro$oft's calc*
I made a pretty sweet calc in VB last year that was everything that MS's is with better interface and more options, damned if i can't find my projects cd from VB...
Cool. I hope to do that when I get the hang of Win32 stuff in DirectX.
thats cool man, i gotta admit, i h8 vb and i am developing a love for C++, but GOD do i miss the EASE of VB gui :P
lol aight i'm out for the nite.
tsk tsk ... make sure that when the user selects the divide option, that the second thing entered (the number its dividing the first number by) is not 0! eg,,Code://////////////////////////////////////////////// //Name: Divide() //Desc: The division function /////////////////////////////////////////////// void divide() { system("cls"); header(); cout << "Enter the first value you wish to divide: "; cin >> a; // the first value to be divided cout << "\nThank you. Enter another value: "; cin >> b; // the second value to be divided while(b = 0) { cout << "Please enter a number other than 0 please: "; cin >> b; } da = a / b;// ma equals the product of a divided by b // Give out the product and ask the user a few q's cout << "\nThe division of the given numbers is: "<<da<<"\n"; cout << "\n\n1] Do more division\n" "2] Return to main menu\n3] Quit\n\n"; cin >> pick.choice; // If the user presses '1', then redo the division process if(pick.choice == 1) multiply(); // If the user presses '2', then start the game over else if(pick.choice == 2) begin(); // If the user presses anything else, then quit and exit the game else exit(1); }
Thanks face_master. I forgot about that. I'm planning on uploading a new version later on today (It'll probably be on my website). Thnx RoD.
This is a new version of the calculator. It now adds the previous stuff that what said here, and now also has a new option to figure the area of a circle. There is a slight bug (warning actually) which states:
main.cpp(34) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
I don't know how to fix this one, so any help would be appreciated. This deals with PI.
truncation from 'const double' to 'float'
I don't know how to fix this one, so any help would be appreciated. This deals with PI.
it means the double is being changed to a float.
The double is "higher" then the float if u will, so its called "demoting".
heres a lil example of pro/demot'n:
promoting -
int example;
int final;
final = double(example); // example is now a double.
Demoting -
double example;
int final;
final = int(example); // Example is now a integer.
Hope this helps! The warning is just lettingu know that this is happening, it won't hurt anything.