Create a Mini Project on Electricity Calculation using C language

Step 1:

Open IDE (I used codeblock).
 
Step 2:

Write below given code in code window to calculate Electricity charges bill: 
  1. #include < stdio.h >   
  2. #include < conio.h >  
  3.   
  4. int main()  
  5.   
  6. {  
  7.   
  8.     int units;  
  9.   
  10.     float total_bill;  
  11.   
  12.     //here we are using printf(""); function to show the output on screen  
  13.   
  14.     printf("\n\nYOU ARE WELLCOME IN ELECTRTICITY BOARD DEPPARTMENT\n.\n");  
  15.   
  16.     printf("ELECTRICITY BOARD RATE CHART (Rates/Unit)\n\n");  
  17.   
  18.     printf("An electricity board charges the following rates to domestic users to discourage large consumption of energy:\n\n");  
  19.   
  20.     printf("0 Unit to 50 Units .............................. =Rs.2.5/Unit\n\n");  
  21.   
  22.     printf("51 Unit to 100 Units .............................. =Rs.3/Unit\n\n");  
  23.   
  24.     printf("101 Unit to 200 Units .............................. =Rs.3.5/Unit\n\n");  
  25.   
  26.     printf("201 Unit to 300 Units .............................. =Rs.4/Unit\n\n");  
  27.   
  28.     printf("301 Unit to 400 Units .............................. =Rs.4.5/Unit\n\n");  
  29.   
  30.     printf("401 Unit to 500 Units .............................. =Rs.4.75/Unit\n\n");  
  31.   
  32.     printf("and more than 500 Uits .............................. =Rs.5/Unit\n");  
  33.     printf(".............................................................\n\n");  
  34.   
  35.   
  36.   
  37.     printf("\nPlease enter the number of units which has been consumed as per meter reading\n\n");  
  38.   
  39.     //here we are using scanf(""); function to get input from end user  
  40.     scanf("%d", & units);  
  41.     //after getting input from user, we will check the conditions to calculate actual bill charges   
  42.     if (units <= 50)  
  43.   
  44.     total_bill = units * 2.5;  
  45.   
  46.     else if (units <= 100)  
  47.   
  48.     total_bill = units * 3;  
  49.   
  50.     else if (units <= 200)  
  51.   
  52.     total_bill = units * 3.5;  
  53.   
  54.     else if (units <= 300)  
  55.   
  56.     total_bill = units * 4;  
  57.   
  58.     else if (units <= 400)  
  59.   
  60.     total_bill = units * 4.5;  
  61.   
  62.     else if (units <= 500)  
  63.   
  64.     total_bill = units * 4.75;  
  65.   
  66.     else total_bill = units * 5;  
  67.   
  68.     //and finally, we will show result with bill charges    
  69.     printf("\n\nthe bill to be paid by you Rs.%f", total_bill);  
  70.   
  71.     //here we are using getch(""); function to stop result on screen until we press any key  
  72.     getch();  
  73.   
  74. }  
Thank you.