Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Please help, I am having an issue with part of my program.
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
deepe2190




PostPosted: 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



A2Q3.cpp
 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
Sponsor
sponsor
TokenHerbz




PostPosted: 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




PostPosted: 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!
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: