Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
exp6
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' //pavithra 7060 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { int age,n; System.out.println("How many guests?"); Scanner s=new Scanner(System.in); n=s.nextInt(); for(int i=1;i,n;i++) { System.out.println("welcome guest!"+i+"How old are you?); age=s.nextInt(); if(age>=13 && age<=19) System.out.println("Hey teenager!Enjoy your badam milk as you are a teenager); else if(age>19) System.out.println("Hey you are an adult!here is your coke"); else System.out.println("NO ENTRY!!"); } ) }
run
|
edit
|
history
|
help
0
heeeeell
multiplo de 4 y 6
Vowel Substring
updated
2b
Basic LinkedList in Java (rewritten using for-loops)
output2
10 Wizards
Multiplying Two Base-36 Numbers
JAVA # 20 RASTGELE SAYIDAN EN KÜÇÜĞÜNÜ BULMAK