~cpp #include<iostream.h> void main() { int i,j; int a,b; for(i=0;i<5;i++) { for(j=0;j<=i;j++) { cout<<"*"; } cout<<" "<<"\n"; } for(a=0;a<5;a++) { for(b=4;b>=a;b--) { cout<<"*"; } cout<<" "<<"\n"; } }두번째
~cpp #include<iostream.h> void main() { int i,j; int s=1; cin >> i; if(i<=10){ for(j=1;j<=i;j++) s=s*j; cout<< s; }