User forums > Using Code::Blocks

CB. bug? C programming

(1/1)

fausto:
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.

Jenna:
What does not work ?
Anything C::B related or programming related ?
In the second case your question violates our forum rules 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).

fausto:

Sorry, wrong code... :-[ :-[

correct is

   for (i=8;i>1;i--)

Bye, Fausto.

Navigation

[0] Message Index

Go to full version