Advertisement
Guest User

Franco

a guest
Mar 26th, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. main()
  4. {
  5.     float num1,num2=0;
  6.  
  7.     while(num1||num2 != -1)
  8.     {
  9.         printf("Enter in Num1 \n");
  10.         scanf("%f",&num1);
  11.         printf("Enter in Num2 \n");
  12.         scanf("%f",&num2);
  13.        
  14.        
  15.         if(num1==-1 || num2==-1)
  16.         {
  17.             exit(0);
  18.         }
  19.         else
  20.         {
  21.             if(num1>num2)
  22.             {
  23.                 printf(" \n %.1f \n",num2);
  24.             }
  25.             else
  26.             {
  27.                 printf(" \n %.1f \n",num1);
  28.             }
  29.         }
  30.     }
  31.    
  32.    
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement