Description输入n值,打印下列形状的金字塔,其中n代表金字塔的层数。Input输入只有一个正整数n。Output打印金字塔图形,其中每个数字之间有一个空格。#include <iostream>#include <iomanip>using namespace std;int main(){ int n,i,j; cin>>n; for(i=1;i<=n;i++) { for(j=1;j<=2*(n-i);j++) cout<<" "; for(j=1;j<=i;j++) { if(i==1) co Read More
posted @ 2013-05-06 19:30
javawebsoa
Views(582)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号