for (i = 1; i <= 1000; i++) {
if (i % 7 == 0)
printf("%d ", i);
if (i == 100 || i==200 || i==300 || i==400 || i==500||i==600||i==700||i==800||i==900||i==1000) {
printf("Continue(y/n)? ");
scanf("%c", &a);
if (a == 'y')
continue;
else
break;
}
It's a multiple of 7 from 1 to 1000 Every time it's over 100, I'm asking if you're going to continue What's wrong?
c
scanf("%c", &a);
Change the top line as below. If you look closely at the front of %c of the code below, you can see the space bar.
scanf(" %c", &a);
© 2024 OneMinuteCode. All rights reserved.