#How to generate a random equation based on a target number?

3 messages · Page 1 of 1 (latest)

versed sapphireBOT
#
  1. Wait patiently for a helper to come along.
  2. Once someone helps you, say thank you and close the thread with: ```diff
    +close
bold hound
#

'''
#language = java
import java.lang.Math;
class operation{
//variables and constructors
public String equation(int num,int operations){
int[] digits = new int[operations+1];
digits[0] = num;
String[] operators = new String[operations];
for(int x = 0;x<operations;x++){
int chosen = //random num depending on how many operators you have
//for each possible value of chosen, can use switchcase or ifelse
if(chosen==num){
float
}
}//end for loop
}//end method
}//end class

'''