Write a C++ program to calculate electricity bill charges based on units consumed: First 100 units @ $1.5/unit, next 150 units @ $2.5/unit, above 250 units @ $3.5/unit.
A single integer Units consumed.
Print total bill amount formatted to 2 decimal places.
Units >= 0
200
375.00
Calculates tiered electricity tariff rates: 100 * 1.5 + 100 * 2.5 = 150 + 250 = 400? Wait: 100*1.5=150, remaining 100*2.5=250. Total = 400.00. Wait for sample input 200: 100*1.5 + 100*2.5 = 150 + 250 = 400.00.
#include <iostream>
#include <iomanip>
int main() {
int units;
if (std::cin >> units) {
// Write your code here
}
return 0;
}Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used