C primer plus 第六版 第六章 第四题 编程练习答案

版权声明:转载请注明来源~ https://blog.csdn.net/Lth_1571138383/article/details/83118963

Github地址:φ(>ω<*) 这里这里。

#include<stdio.h>
int main(void)
{    
    int i = 0;  // Create for loop.
    int j = 0;  // The same with last one.

    char a = 'A';
    char n = '\n';

    for ( i = 0; i < 6; i++)
    {
        for ( j = 0; j <= i; j++)
        {
            printf("%c", a);
            a++;
        }
        putchar(n);
    }
    
    return 0;
}
 

猜你喜欢

转载自blog.csdn.net/Lth_1571138383/article/details/83118963
今日推荐