Skip to content

Justbtech

  • GIS
  • CTPM
  • Machine Learning
  • Privacy Policy

billing

Calculate Electricity Bill Using Slab Rates in C

September 26, 2026 by admin

This program calculates an electricity bill using slab-based rates: Rs.1.50/unit up to 100 units, Rs.3.00/unit for units from 101-200, and Rs.5.00/unit for units above 200. C Program #include <stdio.h> int main() { int units; float bill; printf(“Enter number of units consumed: “); scanf(“%d”, &units); if (units

Categories C Programming Tags billing, C programming, if-else ladder, lab exam Leave a comment

Recent Posts

  • C Programming & Data Structures: Complete Syllabus Index
  • Recursive Functions in C: Factorial and Fibonacci, Revisited with Recursion Trees
  • Functions in C for Unit III: User-Defined Functions, Inter-Function Communication, Storage Classes, and Scope Rules
  • Sorting in C: Bubble Sort, Selection Sort, and Insertion Sort
  • Searching in C: Linear Search and Binary Search

Recent Comments

No comments to show.

Archives

  • September 2026
  • September 2025
  • October 2024
  • April 2023
  • January 2023

Categories

  • C Programming
  • CTPM
  • GIS
  • Machine Learning
  • Regression Model
  • Uncategorized
© 2026 Justbtech • Built with GeneratePress