Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.   int M, m, max, min;
  5.    while (M != 0)  {
  6.       scanf("%d", &M);
  7.       scanf("%d", &m);
  8.   if (m!=0) {
  9.        if (M<m){
  10.     max=m;
  11.     min=M;
  12.     } else
  13.         max=M;
  14.         min=m;
  15.     } else max=M;
  16.            min=M;
  17.    }
  18.     printf("%d %d", max, min);
  19.   return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement