Hello,
I'm new to programming and when i was creating a simple program which prints a set of numbers, I incremented the for loop as x=+1 but when I executed this, 1 was written again and again without an end of execution, does anyone have an idea on what might be wrong.
below is the code for reference, Also I'm using Bcc 5.5 compiler
Code:#include<stdio.h> #include<math.h> void main() { int x; x=0; for(x=0;x<10;x=+1) { if (x==5) break; printf ("%d\n", x); } }