This program is to display the electricity bill calculation based on the number of units consumed every month Input : the number of units – variable name – unit Output – Amount of rupee – variable name – amount Logic: Units Rupees 1-50 units 0.75/unit 51-100 0.85/unit 101-200 1.50/unit 201-300 2.20/unit >300 3.00/unit In all the cases, there will be service charge of Rs.20 will be collected. #include <stdio.h> #include <conio.h> int main() { float amount=0,units;; printf("Enter the number of units"); scanf("%f", &units); if(units <=50) { amount = units * 0.75; } else if(units >50 && units <=100) { amount=0.75 * 50 + 0.85*(units-50)
Its all about Network Simulations (NS2, NS3), Internet of Things, Sensor Networks, Programming, Embedded Systems, Cyber Physical Systems, etc