0
点赞
收藏
分享

微信扫一扫

C++ 做金字塔

RIOChing 2022-04-14 阅读 170
c++
#include "pch.h"
#include <iostream>
#include<iomanip>
using namespace std;

int main()
{
	
	for (int i = 0; i <= 3; i++) {
		cout << setw(4 -i) << '*';
		for (int j = 0; j <i * 2; j++) {
			cout << '*';
		}
		cout << endl <<endl;
	}
		return 0;
	
}
举报

相关推荐

0 条评论