

#include<stdio.h>
#include<stdlib.h>
int main(void)
{
const int ROWS = 6;
const char CHARS ='K';
int row;
char ch;
row = 0;
ch = 'A';
while(row++< ROWS)
{
while(ch < CHARS)
printf("%c", ch++);
printf("\n");
}
system("pause");
return 0;
}
自己转换的就成这样了

我知道里面的while语句运行完ch就变成K了,所以第一个while运行第二次是空白的,但是想了半天没想起来怎么修改才能和for语句输出的结果一样