본문 바로가기

컴퓨터

[입력-자가진단7] 입력 - 자가진단7 Time Limit : 1000MS 두 개의 정수를 입력 받아 곱과 몫을 출력하시오. (먼저 입력 받는 수가 항상 크며 입력되는 두 정수는 1이상 500이하이다.) 정수 입력 16 5 곱 = 80 몫 = 3 #include int main(void){ int a, b; printf("정수 입력 "); scanf("%d %d", &a, &b); printf("곱 = %d\n몫 = %d", a*b, a/b); return 0; }
[입력-자가진단6] 입력 - 자가진단6 Time Limit : 1000MS 키를 입력받아 출력하는 프로그램을 작성하라. 키만 정수로 입력 받는다. 키 = 170 당신의 키는 170cm입니다. 정올의 문제들중 입력예의 파란색(예, "키 = ", 자기주도 교재에서는 이탤릭체)은 입력을 받기위해 보여주는 지문입니다. 따라서 색은 무시하고 출력하면 되며.. 이러한 지문 뒤에는 항상 공백이 하나 있어야 합니다. #include int main(void){ int height; printf("키 = "); scanf("%d", &height); printf("당신의 키는 %dcm입니다.\n", height); return 0; }
[입력-자가진단5] 입력 - 자가진단5 Time Limit : 1000MS 섭씨 = (화씨-32) x 0.55, 화씨 = (섭씨 x 1.8) + 32이다. 섭씨 21.6°를 화씨로, 화씨 110.3°를 섭씨로 변환하여 다음 형식에 맞추어 소수 둘째 자리에서 반올림하여 소수 첫째자리까지 출력하시오. 자리지정을 이용하여 출력예 처럼 위아래의 줄이 맞아야 합니다. #include int main(void){ printf("섭씨 %5.1lf도는 화씨 %4.1lf도이다.\n",21.6, (21.6*1.8)+32.0); printf("화씨 %5.1lf도는 섭씨 %4.1lf도이다.\n",110.3, (110.3-32.0)*0.55); return 0; }
[입력-자가진단4] 입력 - 자가진단4 Time Limit : 1000MS 다음 두 값을 변수에 저장하고 곱셈 계산식을 출력하는 프로그램을 작성하라. 추의 무게 = 49 , 중력의 비율 = 0.2683 49 * 0.268300 = 13.146700 #include int main(void){ int a; float b; a=49; b=0.2683f; printf("%d * %f = %f", a, b, a*b); return 0; }
[입력-자가진단3] 입력 - 자가진단3 Time Limit : 1000MS 두 개의 정수형 변수를 선언하고 값을 대입하여 아래와 같이 출력되는 프로그램을 작성하라. 55 - 10 = 45 2008 - 1999 = 9 #include int main(void){ int a, b; a=55; b=10; printf("%d - %d = %d\n", a, b, a-b); a=2008; b=1999; printf("%d - %d = %d\n", a, b, a-b); return 0; }
[입력-자가진단2] 입력 - 자가진단2 Time Limit : 1000MS 정수형 변수 2개를 선언하여 -1과 100을 대입한 후 아래와 같이 출력하는 프로그램을 작성하라. -1 100 #include int main(void){ int i = -1; int j = 100; printf("%d\n%d", i,j); return 0; }
[입력-자가진단1] 입력 - 자가진단1 Time Limit : 1000MS 정수형 변수를 선언하고 -100을 대입하여 출력하는 프로그램을 작성하라. -100 #include int main(void){ int i = -100; printf("%d", i); return 0; }
1. HTML Basis Example This is first head. This is first paragraph. This is first head. This is second head. This is third head. This is fourth head. This is fifth head. This is sixth head. This is first paragraph. This is another paragraph. This is first head. This is second head. This is third head. This is fourth head. This is fifth head. This is sixth head. This is first paragraph. This is another paragraph. This ..