전체 글
-
C언어 세금계산기 (A tax calculator)C language 2017. 7. 31. 20:11
C언어 문제로 세금계산기를 만들어보았다. 이 프로그램은 얼마를 벌었는지와 오버타임까지 계산하고있으며, 40시간까지는 10달러를 받고 40시간이상부터는 오버타임으로 지정하여 시간당 15달러를 받는다. 아래 정해진 텍스룰은 300달러 까지는 15%를 세금으로 300~450달러까지는 20%, 450달러 이상은 25% 를 세금으로 받는것으로 계산한다 A tax calulator. This program takes hours worked over a week, and calculates gross pay, taxes, and net pay. Hourly pay is 10$ Overtime is over 40 hours, and overtime pay calculate 15$ The tax rate up to 30..
-
C언어 아스키코드 변환 (to change ascii code)C language 2017. 7. 31. 20:00
C언어를 이용한 숫자(16,10,8진수)를 아스키코드로 변환한다Number to changed ascii code by C language #include #include int main(void) { char c; int count = 0; int code =0; printf(" 1.DEC 2.HEX 3.OCT : "); scanf("%d",&code); while((c = getchar()) != '#') { if (c == '\n') { count = 0; printf("\n"); printf(" \n enter anything to change ascii code : "); continue; } if (code == 1) { printf("%-5d",c); count++; } else if (co..