iipq

Untitled

Nov 19th, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2. int main(){
  3.     float mb, gb, bill,ebill;
  4.  
  5.     printf("Enter used megabytes: ");
  6.     scanf("%f", &mb);
  7.     gb=mb/1024;
  8.  
  9.     if (gb<20){
  10.         bill=(mb*0.95)+2000;
  11.         printf("Total bill: %f", bill);
  12.     }
  13.     else
  14.         {
  15.             bill=(mb*0.95)+2000;
  16.             ebill=bill-(bill*0.15);
  17.     printf("Total bill = %f", ebill);
  18.     }
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment