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:  8 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
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  [ 1 Posts ]
Jump to:   


Style:  
Search: