Hmm, must have had a bad runtime. It seems to be closing just fine when i run it now.
Type: Posts; User: Summonerur
Hmm, must have had a bad runtime. It seems to be closing just fine when i run it now.
yeah, it does everything i want it to. I just want to make it so at the end where i have them type any key to close it closes the window.
Edit: woops, continue should be quit. Sorry
I have this program and I am not really sure on how to get it to close at the end.
#include <stdio.h>
#include <conio.h>
int newTotal = 0;
int input = 1;
int maxTotal = 0;
Has nothing with disagreeing to anything. We want our moneys worth and we want to be taught what we came here to learn. We didn't pay to be put into rooms with professors who are not any where near...
And I don't want to make it sound like I am the only one fustrated. A number of students simply walked out of class today because of the way this class went.
Professor Dee. I am being so broad because I talk to my roomatess who are both sophmores and they say almost all the programming classes follow suit with this one.
of course he uses void main ^_^
The teachers here are pathetic. If the school is one that only offers 2 degrees, I would expect them to be well taught. especially a place with such a repuation.
...
So we had a quiz today in our CS120 class. (c programming)
The first question:
T or F: C is a high level programming language.
Now, while C is in fact a high level programming language, the...
Sorry:
input:
A: 32
B: 34
Expected output: 46.69047012
given output: 46.6905
Just wondering how to stop it from rounding
Wow! Thanks for the help, I know everything I need to know now.
:rolleyes:
Do you actually enjoy sitting here bashing on people who are trying to learn things? I have been looking at previous...
yeah, something like that. where the square root will end up as a very large number. It seems to be rounding it off at random places at times.
http://rchevys.com/ffxi/underRATEDGames/test.txt
...
ahhh :) That did the trick. One last question.
How do I get the printf() to output the answer without rounding off?
Woops, that was normally a +. I accidently copied and pasted over it when i was trying something else. but thats not the problem.
printf("A: ");
scanf("%1f", &A);
printf("B: ");
scanf("%1f", &B);
calculation = A*A-B*B;
C = sqrt(calculation);
printf("C = %f", C);
I tried that with still no luck. Still giving me 0.0000
I changed it to :
(still no good)
#include <stdio.h>
#include <math.h>
#include <windows.h>
double A,B,C,calculation;
I changed that but the answer is still coming out to "0"
I am trying to get a program to calculate the side of a triangle. I know this is a simple code, im a first year student. So bare with me :cool:
http://rchevys.com/ffxi/underRATEDGames/test.txt...