Advertisement
aiNayan

Task6

Aug 17th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4.    int U;
  5.    printf("Input the amount of KWh: ");
  6.    scanf("%d", &U);
  7.    if (U>=1 && U<=100)
  8.    printf("Rs. 10/unit");
  9.    else if (U>=100 && U<=200)
  10.    printf("Rs. 15/unit");
  11.    else if (U>=200 && U<=300)
  12.    printf("Rs. 20/unit");
  13.    else if (U>300)
  14.    printf("Rs. 25/unit");
  15.    return 0;
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement