Advertisement
Albert3069

6 weeks project (1) - 202007032 최윤솔

May 3rd, 2020
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5.     int a;
  6.     int b;
  7.  
  8.     printf("정수를 입력하시오\n");
  9.     scanf("%d", &a);
  10.     printf("2번째 정수를 입력하시오\n");
  11.     scanf("%d", &b);
  12.    
  13.     double c;
  14.     c = a / b;
  15.    
  16.     double d = a % b;
  17.    
  18.     printf("몫은 %f, 나머지는 %f입니다.\n", c, d);
  19.  
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement