Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: fausto on January 07, 2017, 07:59:53 pm
-
Hi everybody!
I wrote a simply C program with C:B
------------------------------------------
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i;
for (i = 8; i < 1; i--)
{
printf("Hello world!\n");
}
return 0;
}
-------------------------------------------
The compilation give no errors, but the program don't work :( :(
Is this a bug?
Thanks, Fausto.
-
What does not work ?
Anything C::B related or programming related ?
In the second case your question violates our forum rules (http://forums.codeblocks.org/index.php/topic,9996.0.html) and you should (re-)read the rules.
If it just does not print anything, it's because of the error you made (or you copied the wrong code).
By the way: code should be placed into code-tags (see the "#"-button above the edit-box of the forum).
-
Sorry, wrong code... :-[ :-[
correct is
for (i=8;i>1;i--)
Bye, Fausto.