0

Please look at my "Music generator" and tell me, why it doesn't work.

https://code.sololearn.com/cy03k14CwgOV/?ref=app

16th Sep 2018, 12:23 PM
C. Scheler
C. Scheler - avatar
4 ответов
+ 5
I can't understand what the algorithm is about, but sounds like you need loops... I assume how_many_notes variable corresponds to how many "new" output you want? In which, if that is the case, should at least look like: for (int i = 0; i < how_many_notes; i++) { // your entire algorithm here // print your output // Assign output to initial value } https://code.sololearn.com/cmXBWjyJ1R6m/?ref=app
16th Sep 2018, 1:12 PM
Hatsy Rei
Hatsy Rei - avatar
+ 2
You really don't like loops huh.
16th Sep 2018, 12:52 PM
Hatsy Rei
Hatsy Rei - avatar
+ 1
I finally got it! :D In the last line I have to writhe "input = z1", and not "int input = z1".
16th Sep 2018, 2:34 PM
C. Scheler
C. Scheler - avatar
0
You give an input. -> It calculates a output. -> It sets the value of the input to the value of the output. -> It calculates the new output. This is what I wanted to do.
16th Sep 2018, 12:57 PM
C. Scheler
C. Scheler - avatar