|
|
NAmerica 344124450 181971633 266224500 146.3 ... ... ... ... ... ... ... ... ... ... ... ... ------------------------------------------------------------------ Total/ xxxxxxxxxx xxxxxxxxx xxxxxxxxxx Area with most Internet users (2000): xxxxxxxxxxxxx Number Users: xxxxxxxxxx |
|
|
NAmerica 344124450 266224500 146.3 SAmerica 396626130 156609436 995.8 CAmerica 154298120 38433400 1094.5 Caribbean 41632722 9647000 1624.5 |
|
|
|
|
That depends what the figures that you do have in the text file mean. Can you give exact definitions? |
NAmerica - Area 344124450 - Area Population 266224500 - Internet Users 2010 146.3 - % increase from 2000 |
|
|
|
|
|
|
Americas Internet Usage Report Parker Bushey, CS2010, 2:30PM Area Population 2000 2010 (% Pop) 2000-2010 NAmerica 344124450 5932976 266224500 146.3 SAmerica 396626130 5932976 156609436 995.8 CAmerica 154298120 5932976 38433400 1094.5 Caribbean 41632722 5932976 9647000 1624.5 Press any key to continue . . . |
The problem is that you calculate internettwo only once. Also you calculate it before you have even read in the values that you need to put into the equation. You need to do that calculation *after* you read in the values and you have to do it *every time* you read a new set of values. |
Well you could create a variable outside the loop and set it to zero. Then in the loop check each time if the number of users is greater than the number in your variable. If it is then set your variable to that number. After the loop your variable should contain the highest value. |
|
|
Americas Internet Usage Report Parker Bushey, CS2010, 2:30PM Internet Users Percent Growth Area Population 2000 2010 (% Pop) 2000-2010 -------------------------------------------------------------------------------- NAmerica 344124450 181971633 266224500 146.3 SAmerica 396626130 15726996 156609436 995.8 CAmerica 154298120 3511502 38433400 1094.5 Caribbean 41632722 593844 9647000 1624.5 -------------------------------------------------------------------------------- Total/ 940150102 1943624899 -1315762170 Area with most Internet users (2000): NAmerica Number Users: 181971633 Press any key to continue . . . |
|
|
|
|
|
|