my assigment tell me to:
Write a program to randomly generate a 3-digit number N (it is ok if the number has
fewer than 3 digits). Create a number NN which is N placed next to it. Example, if
the number N is 263 then NN is 263263. If N is 7, NN is 007007. If N is 032, NN is
032032.
Next, divide NN by 7, and then by 11 and then 13.
Write the original number and the final result after the divisions.
Formula to randomly generate a 3-digit number is
(int)Math.floor(Math.random()*1000+1)
this is what I came up with but comes up with errors. Can I get some help
ublic class chapter3_problem_2 {
public static void main(String[] args) {
int n = (int)Math.floor(Math.random()*1000+1);
int nn = ("n" + "n");
System.out.println( +nn);
}
}
what am I doing wrong?