Please help, I am having an issue with part of my program.
Author |
Message |
deepe2190
|
Posted: Wed Sep 27, 2017 7:47 am Post subject: Please help, I am having an issue with part of my program. |
|
|
-Hi, I am new to c++ and can't figure out how to do part of my assignment for school. The question for my assignment is: "Write an application that keeps inputting an integer from the user until zero is entered. The program will calculate and display the average of the numbers, and display the largest and smallest of the numbers. Zero is not to be included in the average, largest or smallest printouts." I have gotten it to display the average and the largest number, but for the smallest, it always displays 0. Is there something I can add like an if statement to prevent this?
-Ethan
Description: |
Here is my code for the question. If there is anything I can improve other than my issue, then please let me know. |
|
Download |
Filename: |
A2Q3.cpp |
Filesize: |
801 Bytes |
Downloaded: |
168 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
TokenHerbz
|
Posted: Sun Nov 12, 2017 12:36 am Post subject: RE:Please help, I am having an issue with part of my program. |
|
|
how do you not include something you dont want?? dont have it...
so like for your array right, just make sure if num != 0 then it's an acceptable for the processing. otherwise ignore it....
|
|
|
|
|
|
Intrusion
|
Posted: Tue Nov 28, 2017 8:51 pm Post subject: Re: Please help, I am having an issue with part of my program. |
|
|
Code removed. We aren't here to do your homework for you!
|
|
|
|
|
|
|
|