1.请尝试用while循环打印下面的图形。
还未解出:有会的大神可以提点一下
!!!!!!!!!!!!!!!!!!!!!!!!
2.请尝试用while循环打印下面的图形。
#include <stdio.h>
#include <stdlib.h>
int main()
{int a, b, c, n;a = 1;c = 1;scanf("%d", &n);while (a <= n){if (1 <= n <= 30){b = 1;while (b <= a){printf("%d ", c);b = b + 1;c = c + 1;}}printf("\n");a = a + 1;}system("pause");return 0;
}
运行效果: