C語言旅途之for嵌套循環求出金字塔

Ⅰ、for嵌套循環求出金字塔: ①、//代碼摘下直接可以運行 #include<stdio.h> int main() { printf(「Please input the number of n!\n」); int i,j,n; scanf("%d",&n); for(i=1;i<=n;i++) //注意空格與號是在一個等級,平行運行 { for(j=1;j<=n-i;j++) printf("
相關文章
相關標籤/搜索