아무도 안도와주세요 ㅠㅠㅠㅠㅠㅠㅠ
제발(123.214)
2015-11-03 22:07
추천 0
#include <stdio.h> #define NUMBER 50 int main(void){ int i, j; int num; int tensu[NUMBER]; int bunpu[11] = {0}; puts("상품가격계산프로그램입니다."); printf("계산하려는상품개수를입력해주세요.(50개 이상의 옷은 동시 계산이 불가능합니다):"); do { scanf("%d", &num); if (num < 1 || num > NUMBER) printf("a 주의[1이상%d이하]:", NUMBER); } while (num < 1 || num > NUMBER); puts("상품가격을입력해주세요."); for (i = 0; i < num; i++) { printf("-번상품:", i + 1); do { scanf("%d", &tensu[i]); if (tensu[i] < 0 || tensu[i] > 100) printf("a 주의[0이상100이하] :"); } while (tensu[i] < 0 || tensu[i] > 100); bunpu[tensu[i] / 10]++; } puts("n* 다음 영수증 입니다.*"); printf("아래와 같이 계산하십시오"); for (j = 0; j < bunpu[10]; j++) putchar('*'); putchar('n'); for (i = 9; i >= 0; i--) { printf("= - =", i * 10, i * 10 + 9); for (j = 0; j < bunpu[i]; j++) putchar('*'); putchar('n'); } return (0); }
이소스를 변형시켜서 옷가격 합쳐서 가격 나오게 어떻게 해요 ㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠ |
<!-- //con_substance --> <!-- con_banner -->
<!-- 2014-03-18 구글 비동기식 -->
[removed][removed] <!-- Test --> <iframe name="aswift_0" width="160" height="600" id="aswift_0" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" vspace="0" hspace="0" allowfullscreen="true" style="left: 0px; top: 0px; absolute;" allowtransparency="true" i=this.id,s=window.google_iframe_oncopy,H=s&&s.handlers,h=H&&H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&&d&&(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}"></iframe>
[removed]
(adsbygoogle = window.adsbygoogle || []).push({});
[removed]
<!-- 2014-03-18 구글 비동기식 -->
<!-- //con_banner --> <!-- //re_gall_box_1 --> <!-- re_gall_box_2 -->
<!-- 130429 본문 광고 -->
<!-- 2014-03-18 구글 비동기식 -->
[removed][removed]
<!-- Test -->
잘봤습니다~