DESCRIPTIONISBN-10 (International Standard Book Number)은 10자리 숫자로 되어 있습니다. ISBN-10의 각 숫자를 차례대로 d1d2d3d4d5d6d7d8d9d10 라고 했을때, 마지막 숫자 d10 은 앞의 9개의 숫자를 다음 공식에 넣어서 구한 값입니다. An ISBN-10 (International Standard Book Number) consists of 10 digits: d1d2d3d4d5d6d7d8d9d10. The last digit, d10, is a checksum, which is calculated from the other nine digits using the following formula: 만약 위 식을 통해서 구한 값이 10이라면..
DESCRIPTION선형 방정식의 해는 다음 Cramer's rule를 이용해 구할 수 있습니다. A linear equation can be solved using Cramer's rule using the following formula: 사용자로부터 a, b, c, d, e, f를 입력받아 x, y를 구하는 프로그램을 작성하세요. 만약 해가 존재하지 않을 경우 "no solution"이라고 출력하세요. Write a program that prompts the user to enter a, b, c, d, e, and f and displays the result. If ad - bc is 0, report that "no solution"INPUT* Line 1 : 6개의 실수 a, b, c, d..
DESCRIPTION2차 방정식의 해는 다음 공식을 통해서 구할 수 있습니다. The two roots of a quadratic equation ax^2 + bx + c = 0 can be obtained using the following formula: 위 식에서 b^2-4ac 는 2차방정식의 판별식이라고 합니다. 만약 2차 방정식의 판별식이 0보다 크다면 2개의 실수해를 가지고, 0이라면 1개의 실수해를 가지고, 0보다 작다면 0개의 실수해를 가집니다. a, b, c의 값을 입력으로 받아 해를 출력하는 프로그램을 작성하세요. b^2-4ac is called the discriminant of the quadratic equation. If it is positive, the equation has..
DESCRIPTION삼각형을 이루는 3개의 점 (x1, y1), (x2, y2), (x3, y3) 를 입력받아, 그 넓이를 계산하는 프로그램을 작성하세요. 삼각형의 넓이를 구하는 공식은 다음과 같습니다. Write a program that prompts the user to enter three points (x1, y1), (x2, y2), (x3, y3) of a triangle and displays its area. The formula for computing the area of a triangle is s = (side1 + side2 + side3)/2 area = sqrt(s(s - side1)(s - side2)(s - side3))INPUT* Line 1 : 첫번째 점의 좌표 x y..
DESCRIPTIONBody Mass Index (BMI)는 몸무게를 기반으로 하는 건강 측성 수치입니다. BMI를 측정하는 방법은 당신의 몸무게(kg)을 키(m)의 제곱으로 나누면 됩니다. 몸무게 W(pounds)와 키 H(inches)를 입력으로 받아 BMI를 구하는 프로그램을 작성하세요. 1 pound는 0.45359237 kg이고 1 inch는 0.0254 meters 입니다. Body Mass Index (BMI) is a measure of health on weight. It can be calculated by taking your weight in kilograms and dividing by the square of your height in meters. Write a program ..
DESCRIPTION정수 N (0~1,000)를 표현하는 각 자리의 숫자들의 합계를 구하는 프로그램을 작성하세요. 예를 들어 932 정수의 각 자리 숫자들의 합계는 9+3+2=14 입니다. Write a program that reads an integer N between 0 and 1000 and adds all the digits in the integer. For example, if an integer is 932, the sum of all its digits is 14. INPUT* Line 1 : 단일 정수 N (0~1,000) OUTPUT* Line 1 : 단일 정수 (각 자리의 숫자를 더한 값) SAMPLE INPUT932SAMPLE OUTPUT14HINTUse the % operato..
DESCRIPTION미터 M을 입력받아 인치 I로 변환하고 인치 I를 피트 F로 변환하고, 피트 F의 정수부분을 출력하고 피트 F의 소수부분을 인치 I로 변환하는 프로그램을 작성하세요. 1 미터는 3.2808 피트이고, 1 미터는 39.3701 인치 입니다. 그리고 1피트는 정확히 12인치 입니다. Write a program that reads a number in meters M, converts it to feet F and Inches I. One meter is 3.2808 feet, and one meter is 39.3701 inches.INPUT* Line 1 : 단일 실수 M (0~1,000) OUTPUT* Line 1 : 단일 정수 F * Line 2 : 단일 정수 I (0 ≤ I < ..
DESCRIPTION원통의 반지름 R과 길이 L를 입력받아 밑면의 넓이 A와 원통의 부피 V를 구하는 프로그램을 작성하세요. 넓이 A와 부피 V는 다음 공식을 통해서 구합니다. Write a program that reads in the radius R and length L of a cylinder and computes the area A and volume V using the following formulas: A = R * R * 3.14159 V = A * LINPUT* Line 1 : 실수 R (1~1,000) * Line 2 : 실수 L (1~1,000) OUTPUT* Line 1 : A (소수점 첫째자리 아래는 버림, 예: 11.213의 경우 11.2로 출력, 11.0의 경우 11.0로 ..