I have homework C++
-
Enter an array of n real numbers, find and print the smallest and largest elements, and calculates and prints the average of the elements in the array. Print out the elements smaller than the average.
-
@maixeptoanphat And you want others to do your home work?!
-
yepp, pls help me
-
@maixeptoanphat No, I will not. It's your home work, so you have to do it...
-
@jsulm I don't know how to do it, can you give me some instructions?
-
@maixeptoanphat Then ask concrete questions. What did you try? What did not work? This forum is not for teaching C++ basics...
-
@jsulm
sorry, i'm new, and thank you very much :( -
Hi
We can talk in board terms about each task without it being too much cheating.
However being in C++ Gurus forum, its a little off. ;)-
Enter an array of n real numbers,
we need a list here containing "real" values
Did you learn about std::vector ? -
find and print the smallest and largest elements,
Here we can use a for loop to run over the List.
we need 2 new variables to keep track of the biggest and smallest
value we have seen. -
Calculates and prints the average of the elements in the array.
Use a new variable and a for loop to loop the list and sum up
each value in the list. -
Print out the elements smaller than the average.
Again a for loop and use the new variable from before holding the avg value and
check pr value in list
-
-
@mrjj i'm done. Thank you so much
-
lol, I translated the bio statement for this user:
"[EDIT: Name deleted --JKSH] is proud to be the supplier and installation of the highest quality portable folding roof in the area. Please contact us for advice and installation of the new and most beautiful portable folding roof today." -
Thanks @fcarney, I already thought this post has a bad smell.
-
I'm very naive over these things, what's this all about? I don't wish to start a controversy/cause problems, just I don't understand.
-
@JonB
Hi
Its just spammer hunt/prevention so any signs we know from other posts (that turn out to spam later)
is considered. Like advertising for roofs in programming forums.That Sort of fishy. -
@JonB
To roof or to code. That is the question. ;)
So yes, normally they get on the watch list, and as soon as first spam is seen they are banned for good. -
@JonB to change it later to include a spam link or other advertisements
-
@JonB said in I have homework C++:
Then just one more question, sorry: are they likely to get many orders for roofs from a Qt forum?!
Probably not, but such details don't bother spammers because their main goal is to leave hyperlinks in forums: https://en.wikipedia.org/wiki/Spamdexing#Link_spam
-
I sooo miss the days when the InterNet was by geeks, for geeks, and unknown to all but geeks. I blame AOL.
5/24