Helpppp me plz
I need help with making the program I'm making choose a random else statement https://code.sololearn.com/cP7jsJ2pbq46/?ref=app
So you have an if statement. If it is not evaluated to true, then yo want it to execute some random thing? I am a little confused as to what you want...
So you want one of those to be chosen. Well, I would have only one else statement that combines all of your possible outputs. You can generate a random integer and use that in a switch and have the possibilities for the integer be the cases of the switch. I hope this makes sense.
Just generate a random int between [1 and 2 in your case] and have a switch with case 1 being one of the else statements and case 2 being the other else statement. Or you could generate random between 0 and 1 and use another if statement (true or false) Does this make sense?
Hmm... Okay. Whatever you want. I would suggest going through the tutorials more to learn the languages better. They explain all of this; switch caes, randInt generation, if/else and nesting... They are there for a reason. But whatever you want to do. :)
I want to make it choos a random else I put two else's but I need the program to chose a random else thing https://code.sololearn.com/cP7jsJ2pbq46/?ref=app
fu**************** ima go learn swift
Python — File Handling
Question is write a c program to print prime numbers up to n and print the largest number in array.
Achievements on Sololearn
How to draw in the console?