+ 2

How to code 10 number using array and the number user input will be count base on each of the number using c++

code using array

5th Mar 2018, 3:06 PM
Akmal Firdaus
Akmal Firdaus - avatar
30 Respostas
+ 1
I deviated a code I just wrote a bit to perfectly fit your needs. https://code.sololearn.com/chb20FxENILW/#cpp
9th Mar 2018, 5:02 PM
Timon PaƟlick
+ 3
the user enter 10 numbers then program will count the the number eg: input 1 2 3 1 1 2 output will show the highest count the number we input eg: output highest count : 1 number 1 have 3 input sry if this is confusing
5th Mar 2018, 3:20 PM
Akmal Firdaus
Akmal Firdaus - avatar
+ 2
Ok, so: 1 2 2 3 7 2 5 0 1 2 -> 2 2 3 5 3 3 3 3 8 1 7 -> 3 0 1 2 3 4 5 6 7 8 9 -> ?
5th Mar 2018, 3:24 PM
Timon PaƟlick
+ 2
yeah something like that
5th Mar 2018, 3:25 PM
Akmal Firdaus
Akmal Firdaus - avatar
+ 2
What should I write instead of '?'?
5th Mar 2018, 3:25 PM
Timon PaƟlick
+ 2
and also output how many time we input the number 1 2 2 3 7 5 0 1 2 - 2 2 : 3 times
5th Mar 2018, 3:27 PM
Akmal Firdaus
Akmal Firdaus - avatar
+ 2
I'm not sure .. I'll leave that to u
5th Mar 2018, 3:30 PM
Akmal Firdaus
Akmal Firdaus - avatar
+ 2
I'm sorry i don't quite understand that question
6th Mar 2018, 3:26 AM
Akmal Firdaus
Akmal Firdaus - avatar
+ 2
What's more important? It runs fast. It is easy to read. There are few logical steps.
6th Mar 2018, 5:42 AM
Timon PaƟlick
+ 2
thank you so much
9th Mar 2018, 6:32 PM
Akmal Firdaus
Akmal Firdaus - avatar
+ 2
hahaha yeah I don't get it actually your code. i just understand how it works
9th Mar 2018, 6:35 PM
Akmal Firdaus
Akmal Firdaus - avatar
+ 2
alright. anytime is fine
9th Mar 2018, 6:42 PM
Akmal Firdaus
Akmal Firdaus - avatar
+ 1
Can you give steps like this, please? The user enters... Then you do... After that you do... Finally, you output...
5th Mar 2018, 3:09 PM
Timon PaƟlick
+ 1
Ok, I'll give back all numbers in the '?' edge case. Last question before I start typing: How important is performance compared to readability and logical complexity for this code? I'm a student, it might take some days.
5th Mar 2018, 4:13 PM
Timon PaƟlick
+ 1
doesn't matter if it is fast or not logical steps also doesn't matter easy to read sure will help so i think it's important
6th Mar 2018, 3:47 PM
Akmal Firdaus
Akmal Firdaus - avatar
+ 1
thanks for the code.. even though i dont really understand it, really appriciate it. anyway this is the code that i actually want. I try to make it myself https://code.sololearn.com/cvldspxsm4zt/#cpp ps : i am still a beginner at c++ so thats why i dont understand the code.
9th Mar 2018, 6:13 PM
Akmal Firdaus
Akmal Firdaus - avatar
+ 1
anyway i want to ask something. why you are not using "using namespace std;" inside your code?
9th Mar 2018, 6:20 PM
Akmal Firdaus
Akmal Firdaus - avatar
9th Mar 2018, 6:22 PM
Timon PaƟlick
+ 1
i see.. so could you explain to me how your code work? and how to use your code for user to input the number
9th Mar 2018, 6:26 PM
Akmal Firdaus
Akmal Firdaus - avatar
+ 1
alright i already get it. just didn't read it carefully
9th Mar 2018, 6:31 PM
Akmal Firdaus
Akmal Firdaus - avatar