I am trying to figure out how to use a percent chance in order to output a letter.
How my program works is that the user will enter a whole numeric value between 1 and 100, then my program converts that into decimal value. Also the user enters the amount of iterations the loop will occur in the next step.
The next step involves outputting either a x or a y based on the probability entered in the first step, so if the user entered 70, then there will be a 70% (0.7 probability) chance of x being outputted during the z amount of iterations.
Right now I am trying to figure out how to get my program to use the user entered probability in order to determine how many x's it should output.
Thanks in advance, not to sure if it all made sense (newbie programmer here..)