Employee Record

Easy Structures
Solve in Playground →

Problem Statement

Write a C++ program defining an `Employee` structure with ID, designation, and salary, and printing formatted details.

Input Format

ID (int), Designation (string), and Salary (double).

Output Format

Print employee details.

Constraints

ID >= 0, Salary >= 0

Sample Input

5001 Manager 75000.0

Sample Output

ID: 5001, Role: Manager, Salary: 75000.00

Explanation

Uses structures to model employee personnel records.

Starter Code

#include <iostream>
#include <string>
#include <iomanip>

struct Employee {
    int id;
    std::string role;
    double salary;
};

int main() {
    Employee e;
    if (std::cin >> e.id >> e.role >> e.salary) {
        // Write your code here
    }
    return 0;
}

Limits

  • Time Limit: 1s
  • Memory Limit: 256MB

Embedded C Programming

Updated: March 15, 2026
Intermediate

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