Computer Science, asked by anakin207, 5 months ago

can someone help me identify the errors in my programs. this is java btw.
1. Write a program to generate two random numbers between two numbers
entered as arguments to the function ran1.
2. Write a program to display the absolute value of a number if the number is negative. If the number is positive, display a random number between 1 and given number. If the number is zero then display the message “Number is ZERO”.

Attachments:

Answers

Answered by toshiffreefiregamer
0

Answer:

jo muze follow kerega me bhi use follow keruga

Answered by thewakebakecake
1

Answer:

in 1st on try to to this

String a[] = {"a", "b", "c"};

            int r  = (int) (Math.random()*3);

             // the number 3 resembles the the amount of doubles or in this case number of string in my array.

            System.out.println(a[r]);

in second you have to put 2 '=' signs like this

if(x == 0){

System.out.println("abc")

}

Explanation:

Similar questions