| commiedic (3) | |||
|
Hi, This is my first post here and I am in need with some help(might need a lot) with a lesson my professor has given me to help me understand loops. Here is an imgur link to my current homework. http://i.imgur.com/9Mcja.jpg As you can see on there I have them listed on which ones are supposed to be sentinel and which ones are supposed to be count control loops. This is currently what I have:
This class has me stumped currently and I am having a hard time breezing through the class at my instructors speed. So I don't want to get too far behind. Right now this program is giving me an error that opens CMD and gives me infinite lines of "0's". | |||
|
Last edited on
|
|||
| vlad from moscow (3112) | |||||||
First of all instead of
you shall write
Secondly this loop
is infinite. | |||||||
|
|
|||||||
| helios (10126) | |
| Well, to be more accurate, the loop either is infinite or doesn't run at all, depending on user input. | |
|
|
|
| commiedic (3) | |
| Redacted | |
|
Last edited on
|
|
| commiedic (3) | |||
Ok, after doing some more work I have made my program read and write the document to the correct file. Although now in stage 2 of my lesson I need to make it compute the averages of the number. This although is my current output:55 67 458 23 81 33 782 375 528 405 324 950 46 14 864 551 38 167 518 630 630 For some reason it isn't computing the average and is giving me the last number twice. For more information here is the list of numbers I am using and the format they are in on the original file:
| |||
|
|
|||