Hi there!!
I have a simple program (I'm a newbie) that inputs data for different people.
For instance:
Employee nr? 122
Nr of years in company? 2
Employee nr? 29
Nr of years in company? 5

The thing I wanna ask is for a simple way to se a output when all the input is done how many employees the company has? (e.g. counting the number of input employees) I know there are, I just haven't figured it out yet. Should I use "for" or something else.

The output should be something like:

There are currently 55 employees and the average years in the company is 3

Thankfull for any help...

You can easily do it with a for loop, or any method of iteration.
You could also track that information as soon as it is input, so that no iteration is necessary. (update average and total number)

If you want more help than that, you'll have to post some of your code, good luck!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.