Guest User

Untitled

a guest
Jun 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.  
  6.     double inc = 0, mph = 0, fps = 0;
  7.  
  8.     printf("Input increment from 0 to 80: \n");
  9.     scanf("%lf", &inc);
  10.  
  11.     printf("mph to fps. \n");
  12.  
  13.     while (mph <= 80)
  14.     {
  15.         fps = mph * 5280.0/3600;
  16.         mph += inc;
  17.         if (mph <= 80)
  18.         {
  19.             printf("%5.0f %5.1f \n", mph,fps);
  20.         }
  21.         if (inc == 0) {
  22.             inc += 1;
  23.         }
  24.     }
  25.     return 0;
  26. }
Add Comment
Please, Sign In to add comment