-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemployee data.c
More file actions
44 lines (38 loc) · 1.12 KB
/
Copy pathemployee data.c
File metadata and controls
44 lines (38 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/********************************************************************************
* Name :employe data
* Author :Prapanch J
* Description :c-Program
* Version :1.0
* Date :/10/23
* ******************************************************************************/
#include <stdio.h>
struct employeeData {
char name[30];
int id;
int salary;
};
void main() {
int count, i;
printf("Enter the total number of employees: ");
scanf("%d", &count);
struct employeeData eData[count];
printf("Enter Data\n");
printf("\n");
for(i = 0; i<count; i++){
printf("Enter employee's Name: ");
scanf("%s", eData[i].name);
printf("Enter employee's ID: ");
scanf("%d", &eData[i].id);
printf("Enter employee's Salary: ");
scanf("%d", &eData[i].salary);
printf("\n");
}
printf("Employee Data\n");
printf("\n");
for(i=0; i < count; i++){
printf("Employee's Name: %s\n", eData[i].name);
printf("Employee's Id: %d\n", eData[i].id);
printf("Employee's Salary: %d\n", eData[i].salary);
printf("\n");
}
}