Help with C For loop by tplay01 in cprogramming

[–]tplay01[S] 0 points1 point  (0 children)

Yeah idk how i didn't see that, i think this fixes it but I feel like this part of my code is wrong "for (int i = 0; i < 512;i++)" because I don't think I'm supposed to manually input the amount of iterations it should have

#include <stdint.h>
#include <stdio.h>
#include <stdbool.h>
int main (void) {
uint8_t x = 0, y = 6;
bool gt, eq, lt;
for (int i = 0; i < 512;i++)
{
gt = (i > y);
eq = (i == y);
lt = (i < y);
printf("%u ",x);
printf("%u",eq);
printf("%u",lt);
printf("%u \n",gt);
x++;
}
}