05. 센티미터(cm)로 표현된 키를 입력하면 피트(feet)와 인치(inch)로 변환하는 프로그램을 작성하시오. (소수 2자리) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #include int main() { double height, feet, inch; printf("키(cm)를 입력하세요 : "); scanf("%lf", &height); inch = height / 2.54; feet = inch / 12; printf("입력하신 키 %.2lf센티미터는 %.2lf피트와 %.2lf인치에 해당됩니다.\n", height, feet, inch); return 0; } Colored by Color Scripter cs 06. 킬로그램(kg) 단위의 무게를 입력받아 파운드(lb)..
6. 화씨 단위의 온도를 입력받아 섭씨 단위의 온도를 구하는 프로그램을 작성하시오. 123456789101112131415#include int main() { double F, C; printf("화씨온도(F)를 입력하세요. : "); scanf("%lf", &F); C = (5.0 / 9.0)*(F - 32); printf("화씨온도 %.1lf의 섭씨온도는 %.1lf입니다.\n", F, C); return 0; } Colored by Color Scriptercs 07. 키보드에서 문자를 한 개 입력받은 후, 그 문자에 해당하는 ASCII 코드 값을 구하는 프로그램을 작성하시오. 1 2 3 4 5 6 7 8 9 10 11 12 #include int main() { char s; printf("문자를..
01. 다음 프로그램의 결과를 아래의 칸에 맞춰 쓰시오. 1 2 3 4 5 6 7 8 9 10 11 12 13 #include int main() { int age = 20; double gpa = 4.19, weight = 72.3; printf("Result \nage=%3d \nGPA=%4.1lf \n", age, gpa); printf("weight=%5.1lf\"kg\"\n", weight); return 0; } Colored by Color Scripter cs 02. 다음 프로그램을 실행했을 때의 결과를 아래의 칸에 맞춰 쓰시오. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #include int main() { int op1 = 10, op2 = -20, sum; su..