update
This commit is contained in:
parent
3a354e7234
commit
38b24072f0
@ -13,7 +13,6 @@ int main(){
|
|||||||
{
|
{
|
||||||
cout <<"456"<<endl;
|
cout <<"456"<<endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
27
zheng_san_jiao_xin.cpp
Normal file
27
zheng_san_jiao_xin.cpp
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
//正三角形
|
||||||
|
|
||||||
|
#include<iostream>
|
||||||
|
#include<windows.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
int n;
|
||||||
|
cin >>n;
|
||||||
|
|
||||||
|
for (int i = 1; i <= n; i++)
|
||||||
|
{
|
||||||
|
for (int y = 1; y <= n-i; ++y)
|
||||||
|
{
|
||||||
|
cout <<" ";
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int j = 1; j <= 2*i-1; ++j)
|
||||||
|
{
|
||||||
|
cout <<"*";
|
||||||
|
}
|
||||||
|
cout <<endl;
|
||||||
|
}
|
||||||
|
//Sleep(1000000000);
|
||||||
|
return 0;
|
||||||
|
}
|
22
zhi_jiao_san_jiao_cin.cpp
Normal file
22
zhi_jiao_san_jiao_cin.cpp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
//直角三角形
|
||||||
|
#include<iostream>
|
||||||
|
#include<string>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
int n;
|
||||||
|
cin >>n;
|
||||||
|
string xin = "*";
|
||||||
|
|
||||||
|
for (int i = 1; i <= n; i++)
|
||||||
|
{
|
||||||
|
for (int j = 1; j <= i; ++j)
|
||||||
|
{
|
||||||
|
cout <<xin;
|
||||||
|
}
|
||||||
|
cout <<endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user