https://www.acmicpc.net/problem/1008
1008번: A/B
두 정수 A와 B를 입력받은 다음, A/B를 출력하는 프로그램을 작성하시오.
www.acmicpc.net
#include <stdio.h>
int main(){
double A;
double B;
scanf("%lf %lf",&A,&B);
printf("%.9lf",A/B);
int C;
int D;
scanf("%f %f",&C,&D);
printf("%.1f",(float)C/D);
}
'알고리즘 공부' 카테고리의 다른 글
백준 1011 Fly me to the Alpha Centauri [Greedy] (0) | 2020.05.16 |
---|---|
백준 1009 분산처리 (0) | 2020.05.16 |
백준 1003 피보나치 함수 [DP] (0) | 2020.05.16 |
백준 1001 A-B (0) | 2020.05.16 |
백준 1000 A+B (0) | 2020.05.16 |
댓글