0
Please look at my "Music generator" and tell me, why it doesn't work.
4 Answers
+ 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
+ 2
You really don't like loops huh.
+ 1
I finally got it! :D In the last line I have to writhe "input = z1", and not "int input = z1".
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.