answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
blondinia
2 months ago
13

there is a structure called employee that holds information like employee code, name, date of joining. Write a program to create

an array of the structure and enter some data into it. Then ask the user to enter current date. Display the names of those employees whose service is 15 or more than 15 years according to the given current date.
Computers and Technology
1 answer:
oksian1 [950]2 months ago
3 0

Answer:

The following is the C program:

#include<stdio.h>

#include<conio.h>

struct employee{

char empname[50]; int empcode, day, mon, yr;

} employees[30];

int main(){

int total;

printf("Numbers of Employees: "); scanf("%d",&total);

for(int kt=0; kt<total; kt++){

printf("Employee Code: "); scanf("%d",&employees[kt].empcode);

printf("Name: "); scanf("%s", employees[kt].empname);

printf("Date of Joining [dd mm yyyy]: "); scanf("%d%d%d",&employees[kt].day,&employees[kt].mon,&employees[kt].yr); }

int year;

printf("\nCurrent Date [Year only]: "); scanf("%d", &year);

printf("Code\t\t\t Name\t\t\t Date of Joining\n");

for(int kt=0; kt<total; kt++)

if((year - employees[kt].yr) >= 15)

printf("%d\t\t\t %s\t\t\t %d/%d/%d\n", employees[kt].empcode, employees[kt].empname, employees[kt].day, employees[kt].mon, employees[kt].yr);

}

Explanation:

Refer to the attached document for clarification, including comments that elucidate certain lines

Download txt
You might be interested in
Write a program that allows the user to navigate the lines of text in a file. The program should prompt the user for a filename
amid [951]

This code is in Python. I'm not certain what programming language you need.

Refer to the image:

7 0
3 months ago
Read 2 more answers
Which selections are possible for controlling the start time of audio playback? Check all that apply. Automatic Rewind when done
maria [1035]

Selecting the option to trim audio upon clicking would be your best answer

5 0
3 months ago
Use the following data definitions data myBytes BYTE 10h,20h,30h,40h myWords WORD 3 DUP(?),2000h myString BYTE "ABCDE" What will
Natasha_Volkova [1026]

Answer:

Given Data:

myBytes BYTE 10h, 20h, 30h, 40h

myWords WORD 3 DUP(?), 2000h

myString BYTE "ABCDE"

From the supplied information, we can derive that:

(a).     a. EAX = 1

         b. EAX = 4

         c. EAX = 4

         d. EAX = 2

         e. EAX = 4

         f. EAX = 8

         g. EAX = 5

8 0
3 months ago
Grabar microphone audio icon_person click each item to hear a list of vocabulary words from the lesson. then, record yourself sa
Harlamova29_29 [1022]

This problem is a personal reflection and cannot be solved without discussing it after the individual provides input.

5 0
3 months ago
Read 2 more answers
Other questions:
  • In the middle of the iteration, how should a team handle requirement changes from the customer? (1 correct answer)
    7·2 answers
  • Remember for a moment a recent trip you have made to the grocery store to pick up a few items. What pieces of data did the Point
    10·1 answer
  • Ajay wants to read a brief overview about early settlers in the United States. Which type of online text source should he most l
    9·2 answers
  • 7.7 LAB: Using a while loop countdown Write a program that takes in an integer in the range 10 to 100 as input. Your program sho
    11·1 answer
  • Team A found 342 errors during the software engineering process prior to release. Team B found 184 errors. What additional measu
    12·1 answer
  • JAVA Write a program that first asks the user to type a letter grade and then translates the letter grade into a number grade. L
    9·1 answer
  • In step 4 of the CSMA/CA protocol, a station that successfully transmits a frame begins the CSMA/CA protocol for a second frame
    9·1 answer
  • Write a for loop to print each contact in contact_emails. Sample output for the given program:
    15·1 answer
  • c++ 4.17 LAB: Count characters Write a program whose input is a character and a string, and whose output indicates the number of
    14·1 answer
  • 12. Kelly would like to know the average bonus multiplier for the employees. In cell C11, create a formula using the AVERAGE fun
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!