Untitled
unknown
plain_text
7 months ago
620 B
1
Indexable
Never
#include<stdio.h> void main(){ struct employee { int eid; char ename[30]; float esalary; } emp,emp1; printf("Enter the details of employee E1 and employee E2: \n"); printf("Names: \n"); scanf("%s%s",&emp.ename,&emp1.ename); printf("Id: \n"); scanf("%d%d",&emp.eid,&emp1.eid); printf("Salary: \n"); scanf("%f%f",&emp.esalary,&emp1.esalary); printf("Details of the employee E1: \n"); printf("Name: %s \n Id:%d \n Salary: %.1f\n ", emp.ename,emp.eid,emp.esalary); printf("Details of the employee E2: \n"); printf("Name: %s \n Id:%d \n Salary: %.1f\n ", emp1.ename,emp1.eid,emp1.esalary); }
Leave a Comment