Implementation (B) 2 Performance (C) 2 Total 6 Experiment no. 3 DATE – Write a program to generate 5 Random nos. between 1 to 100, and it should OBJECTIVE - not follow with decimal point. - EQUIPMENT/SOFTWARE USED CODE – package javaapplication1; import java.util.Random; public class random { public static void main(String args[]) { Random ob=new Random(); for(int i=0;i<5;i++) { int rand=ob.nextInt(100); System.out.println("Number "+(i+1)+" is "+rand); } } } OUTPUT- SIGNATURE-
Implementation (B) 2 Performance (C) 2 Total 6 Experiment no. 3 DATE – OBJECTIVE - Write a program to generate 5 Random nos. between 1 to 100, and it should not follow with decimal point. EQUIPMENT/SOFTWARE USED - CODE – package javaapplication1; import java.util.Random; public class random { public static void main(String args[]) { Random ob=new Random(); for(int i=0;i<5;i++) { int rand=ob.nextInt(100); System.out.println("Number "+(i+1)+" is "+rand); } } } OUTPUT- SIGNATURE-
java-iet.docx