0

Java

calculate a+b ,two integer a,b(0<=a,b=10) out put a+b

12th May 2018, 11:18 AM
Blessing
7 odpowiedzi
+ 4
import java.util.Random; public class Program { public static void main(String[] args) { Random rand = new Random(); int a = 0; do { a = rand.nextInt(); } while (a>0); int b = 10; int c = a + b; System.out.print(c); } }
12th May 2018, 11:40 AM
Ibaadi Jaya
Ibaadi Jaya - avatar
+ 4
Lol... If you still want me to post the code, say yes again... and please credit my name
12th May 2018, 11:35 AM
Ibaadi Jaya
Ibaadi Jaya - avatar
+ 3
Before I post the code... I want to ask, does someone asked to write a code that does this?
12th May 2018, 11:24 AM
Ibaadi Jaya
Ibaadi Jaya - avatar
0
Yes
12th May 2018, 11:34 AM
Blessing
0
Yes 😊 I’m new to java ,
12th May 2018, 11:37 AM
Blessing
0
Genius 😁
12th May 2018, 11:41 AM
Blessing
0
I got last question for you
12th May 2018, 11:41 AM
Blessing