Hello everyone. I am writing a script for school and am stuck on a certain part
options like "else if (memory == 2){
printf("1536 MB Memory: %.2lf\n", memory1);
} " do not show up when i run the program. any help would be great
Hello everyone. I am writing a script for school and am stuck on a certain part
options like "else if (memory == 2){
printf("1536 MB Memory: %.2lf\n", memory1);
} " do not show up when i run the program. any help would be great
Last edited by falcons7; 09-30-2007 at 01:27 PM.
I don't think you can use the "==" operator when dealing with floats and doubles, but i might be wrong... Why don't you just use an integer for the memory variable? Who is going to want 1234.567 megabytes of memory anyways?
Also, i don't think this qualifies as a script, since C is almost always compiled, not interpreted...
it seems to have worked... thanks