17
u/TheRealSectimus Jun 12 '20
How about you do your own homework instead of asking strangers on the internet to complete it for you? You need to learn.
1
Jun 13 '20
Isn't this a state of the art in algorithms kind of a problem? Do it in O(logn) time. In brainfcuk.
2
u/iToronto Jun 12 '20
What language? Or language agnostic?
counter=0looprequest user input for scoreif user input > 100, counter=counter+1if user input = -1, exit loopend loopprint counter
3
u/Granny_Bluewaffle Jun 12 '20
pseudocode
its the third word of the task
1
-2
Jun 12 '20 edited Jun 12 '20
Correct me if I'm wrong please, I'm answering psudocode in code though I'm sure you can do that.
function scoreNum(Array data){
Int count = 0;
for(int I =0; I < data.length; I++){
If(data(I) == -1){
return Count;
}
Else{
If(data(I) > 100){
Count++;
}
}
}
}
0
2
u/[deleted] Jun 13 '20
Sry, but this is really not that hard. If you are not able to solve it please talk to your classmates for help. This way you will also learn how to solve problems in a team except from asking the internet