I understood the logic but couldn't understood how to code it in JAVA,
Scanner input = new Scanner(System.in);
System.out.println("Enter a number");
int n= input.nextInt();
int randomInteger = random.nextInt();
for(n=0; n<=randomInteger;n-1){
System.out.println();
}
Aucun commentaire:
Enregistrer un commentaire