|
|
|
 |
 |
| 키워드 : |
|
|
| 소개글 |
c++중간-egothing |
| 요약 |
구구단
#include void main() { int a[10][10] ; int h=0 , w = 0 ; for (h=1 ; h<=9 ; h++) { for (w= 2 ; w<=9 ; w++) { a[h][w]=h*w ; cout.width(3) ; // 공간생기게해준다 cout< } cout< } } ---------------------------------- 정수형5개
#include void main() { int Arr[5] ; int* pt ; int sum=0 ; float ave=0.0 ; pt=Arr; for(int i=0 ; i<5 ; i++) { cin>>*(pt+i) ; } for(i=0 ; i<5 ; i++) { sum+=*(pt+i ); } ave=sum/5.0 ; cout<} ------------------------------
정삼각형
#include void main() { int leng ; cin>>leng ; for(int height=1 ; height<=leng ; height++) { for(int space=1 ; space<=leng-height ; space++) cout <<" "; for (int star=1 ; star<=height*2-1 ; star++) cout<<"*" ; cout< } } -----------------------------------
역삼각형 #include void main() { for (int height=1 ; height<=5 ; height++) { for (int space=1 ; space <=heigh |
위 정보및 게시물 내용의 진실성에 대하여 보증하지 아니하며, 해당 정보 및 게시물 저작권과 기타 법적 책임은 자료 등록자에게 있습니다. 위 정보및 게시물 내용의 불법적 이용, 무단전재및 배포는 금지되어 있습니다. 저작권침해, 명예훼손 등 분쟁요소 발견시 하단의 저작권 침해신고를 이용해 주시기 바랍니다. |
|