Solution
#define _CRT_SECURE_NO_WARNINGS
#define BASE 32
#define CONVERSION_FACTOR 9.0/5.0
#include <stdio.h>
int main(void)
{
double celsius, fahrenheit;
printf("Enter a celsius temperature: ");
scanf("%lf",&celsius);
fahrenheit = (celsius * CONVERSION_FACTOR) + BASE;
printf("Fahrenheit Equivalent : %f\n", fahrenheit);
}
결과 창
'Programming Language > C' 카테고리의 다른 글
[C] Week 1 : 프로그래밍의 개념, 프로그램 작성 과정 (0) | 2022.07.04 |
---|---|
[C] 따옴표(' ")와 퍼센트(%) 출력 방법 (0) | 2022.02.06 |
[C] 반지름 const 값 -> 원 넓이, 둘레 계산 (0) | 2022.02.06 |
[C] 아스키 코드 이해 (%c의 사용). (0) | 2022.02.06 |
[C] 반지름 const 값 -> 원 넓이 계산 (0) | 2022.02.06 |