10
12
127
版主
给定一个字符,用它构造一个对角线长5个字符,倾斜放置的菱形。
输入只有一行, 包含一个字符。
该字符构成的菱形。
使用道具 举报
#include<iostream>; using namespace std; int main (){ string a; cin>>a; cout<<" "<<a<<endl; cout<<" "<<a<<a<<a<<endl; cout<<a<<a<<a<<a<<a<<endl; cout<<" "<<a<<a<<a<<endl; cout<<" "<<a; }
|山东智趣岛论坛 ( 鲁ICP备2023024048号 )
GMT+8, 2025-3-1 07:22 , Processed in 0.215108 second(s), 36 queries .
Powered by Discuz! X3.3 Licensed
Copyright © 2001-2020, Tencent Cloud.