Write a C++ program defining an `Employee` class that computes annual salary based on monthly salary input and displays the record.
ID (int), Name (string), and Monthly Salary (double).
Print employee ID, name, and calculated annual salary.
Monthly Salary >= 0
5001 Manager 50000.0
ID: 5001, Name: Manager, Annual Salary: 600000.00
Calculates derived values using class methods.
#include <iostream>
#include <string>
#include <iomanip>
class Employee {
public:
int id;
std::string name;
double monthlySalary;
void displayAnnual() {
// Write your code here
}
};
int main() {
Employee e;
if (std::cin >> e.id >> e.name >> e.monthlySalary) {
e.displayAnnual();
}
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