If you are using MS Visual C++, it will be
First declare the header file #include<stdlib.h>
and the clear console function is system("CLS")
Type: Posts; User: bennyho03
If you are using MS Visual C++, it will be
First declare the header file #include<stdlib.h>
and the clear console function is system("CLS")
It also seems you are missing a pair of {} here to run the 'for' loop.
you are missing a semicolon here
and a } should be added to the end of your above statements...
Use code tags kind of hard to see your codes
maybe your reasoning is right since double is long float. Thanx anyway
thanx for the help but there is a another question though. Why is there a 'f' at the end of ? Thanx
My original code is this
void function(void){
float calculate (float);
float x,y;
int i;
glClearColor(1.0, 0.0, 1.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
I can't seem to draw a circle using glut... anybody knows how to do it... thanx in advance. I think i know the logic and that is to split the circle into individual small lines and outputting them...
www.cprogramming.com is the best mate
thanx but it didn't work...
Hi I am learning openGl and glut now and I place those necessary files like glut.h, glut32.dll and glut32.lib in the respective folders (I am using MSVC ++ 6.0). The problem is the program cannot...
thanks
An example of my program is
average = sum/positive;
where sum and positive are in int form while average is in double.
the problem is i cannot get the answer in double form? how do i solve...
I have got a question. When a user enters a number, it will automatically be prepared to get that amount of variables.
Exp:
Enter numbers to process:3
Enter number:1.2
Enter number:17...
Thanx for all the help.
:confused: :confused:
how do you flip an int where by you enter an int exp:12345 and it outputs 54321?
Thanx for the help :)
thanx i see the problem.
I check on that function and decided to change strtol to strtod. The funny thing is that i try to run values in it and the program gives me wrong answers
eg: 3.3 +6.6 and it gives me 6.6 instead of...
thanx prelude and viaxd but here a question to prelude, i tried your code above, it worked and when i switch the variables to double and %f respectively it fails. did i do something wrong?
i believe a string is more preferable
The question that was given to me is to prompt the user to enter a number followed by an operator and lastly a number,
eg:
User Input: 5 + 5
Program Output: 5 + 5 is 10
I tried using the...
fflush(stdin) before the second scanf because the scanf for the first one captures both the char and return key and treats them both as characters