There is a worker structure, which includes the workshop number and age. Created an array of workers with different data. It is necessary to calculate the number of employees up to 20 years old, from 20 to 30 and more than 30. Output as a table:

workshop code ..... number of employees from 20 ... 20-30 ... 30+

The difficulty arose in the fact that in the table each employee would not occupy a new line with the same workshop code, but would be added to the workshop code that already exists for his code.

struct worker { int codePid, codeCeh, tabNum, yearBirth, codeNation, famStage, workStage, workStageNep, profCode, roz; double ok; char surname[30]; }; int main() { worker w[10]; return 0; } 

Closed due to the fact that the essence of the question is not clear by the participants user207618, Vlad from Moscow , Harry , user194374, aleksandr barakin 15 Dec '16 at 23:58 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Specify the composition of the element of the array "workers". It is necessary to understand by what field the “worker” from that array fits into the shop number. - Majestio

0