C++ gurus help!!!
Why is this not working properly?
see the screenshot, I want the decimals to show up too.. the assignment is on the bottom, my code is on the right
I tried float, I tried fixed setprecision.. they are always showing up as either 4, 3, 3, or 4.000, 3.000, 3.000 etc..
the numbers you are using are represented as ints and the / just yield an int. Try to add a .0 after them.
oh i see THANKS!!!
Get the system("pause"); out of there and see a way to simplfy the program so that I can ask you x number of iterations(precision) of Pi.
I need pause to see the screen though..
well anyway the problem is solved now, thanks =)
Honestly your code is not portable + that system call is a security vulnerability. What you could do is simply a cin >> and wait for an input.
yea I know but why bother the assignment doesn't ask for it..
Because Winblows is sucking your mind. Either way you should aspire for more. Are you just going to be happy with a "just enough"?
lol nope but i have ten more programs to write, so i'd rather finish my hw first maybe play around later.. check this out, i made this yesterday, it was fun
this is an elementary class haha this is my 2nd week.
Cant, I am on Linux + would prefer source code than binary.
ohh hold on:
Maybe you should have declared separate functions and make it a little bit more organized. Some messages could have been in a variable and make typing faster + improve readability. Other than that nice job :)
Join our real-time social learning platform and learn together with your friends!