Computers and Technology
10.09.2020 23:24
148
154
6
Solved by an expert

In a program, you need to store the identification numbers of 10 employees (as integers)

In a program, you need to store the identification numbers of 10 employees (as integers) and their weekly gross pay (as double values). define two arrays that may be used in parallel to store the 10 employee identification numbers and gross pay amounts write a loop that uses these arrays to print each of the employees’ identification number and weekly gross pay.
Show Answers
TrapQueen665
TrapQueen665
4,5(46 marks)

The code to the given question can be given as:

Code:

1)

2 arrays that used to store 10 employee identification number and grosspay amount in parallel and its data-type is int and double.

int Employee_id[10]; //array that store integer value

double Weekly_Gross_Pay[10]; //array that store double value

2)

Define loop for print the details of employees’ identification number and weekly gross pay.

for(int i=0; i<10; i++)  

{  

cout <<Employee_id[i] <<" " << Weekly_Gross_Pay[i] << endl;  

}

Explanation:

The explanation of the above code can be given as:  

In Code (1) we declare two array that's data-type is integer and double. In Employee_id array it store the integer values and Weekly_Gross_Pay it store the double value.

In Code(2) It is used to print the value of array. In that code, we used for a loop because of its entry control loop and we know the size of the array. In this loop, we declare a variable (i) and initialized the value 0 and check the condition(i)less than 1 and increment of i. It prints all the 10 values.  

jeffyisdrunk
jeffyisdrunk
4,4(45 marks)
Aye the answer is calm down

Popular Questions about the subject: Computers and Technology

Who want to zoom only lgbt girls im 14...
Computers and Technology
01.05.2021 02:38
What is a computing server...
Computers and Technology
23.05.2020 09:07
Anyone in the mood to talk!...
Computers and Technology
29.08.2022 05:57
Why are some people using of all places as a social media site?...
Computers and Technology
25.01.2020 08:14
Can u pls sub to my yt it’s Exspirals202 almost at 200 subs...
Computers and Technology
11.11.2020 14:09
What is Machine Learning (ML)?...
Computers and Technology
07.10.2021 05:27

New questions by subject

Please help I’m second guessing this and I know I shouldn’t...
Mathematics
24.03.2023 22:11
Write as a fraction in lowest terms:...
Mathematics
10.10.2021 17:15
Fred is planning a fundraiser where he will collect $4.50 fir...
Mathematics
26.03.2023 23:06
Good name for an online pet store?...
Business
04.10.2020 23:17
Given the function f(x) = 5(x+4) − 6, solve for the inverse...
Mathematics
27.09.2021 02:42
#
#
#
#
# #

We expand our knowledge with many expert answers