Write a program to read from a file called "input.txt" information about 5 workers. Each line would contain two values respectively, an employee ID and the employee's monthly salary.

Assume that the data from the input file is stored in a format as shows in this example. Note: for testing purposes the following data may not necessarily be used. It is just to give you an idea of the format of the data.

Sample contents of input.txt:
10 2000
20 6800
30 9700
40 1500
50 8000

Store the employee information into a 2d array.Assume that the data types are as follows: id(Integer data type) and income (integer data type)

read the info and store the 5 employee records into 2d array

create another function that prints the number of workers who has income of greater than 5000 and the id and income of each worker who has income greater than 5000.

sample output printed to the screen:
sum of incomes:$24500
3 workers have an income greater than $500:
20 $6800;30$9700;50$8000

1 answer

what is the difficulty?

Do you have trouble with I/O? Don't understand arrays? Don't understand functions?

Have you worked out pseudo-code that takes the necessary steps?
Similar Questions
    1. answers icon 1 answer
    1. answers icon 1 answer
  1. My assignment:1- Rewrite your C++ program in Project 1 to compute the number of words, average length and lengths of the words
    1. answers icon 1 answer
    1. answers icon 4 answers
more similar questions