<分区>
我正在尝试 do-while 条件并且其中有另一个 while,我在“你想继续吗?”中遇到问题,它跳过了它。我的代码有什么问题吗?
do {
printf("\nEnter the start value:");
scanf("%d", &start_value);
printf("\nEnter the end value:");
scanf("%d", &end value);
printf("\nEnter the interval value:");
scanf("%d", &interval_value);
while (start_value <= end_value) {
printf("%d ", start_value);
start_value = start_value + interval_value;
}
printf("\nDo you want to continue?");
scanf("%c", &answer);
} while (answer != 'N' || answer != 'n');