Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

Java programming _ studyante _scanner

iamfreecs

Novice
Advanced Member
Messages
34
Reaction score
0
Points
26
Good day sa lahat baka may makatulong po? need kopo sana ng java code(program) para sa project..baka meron kayong code jan na nakatambak tulad po ng calculator, or any simple program gamit ang scanner..

eto po yung nagawa ko hehe


import java.util.Scanner;
class Test {
public static void main (String [] args) {

System.out.print ("Choose Number 1-10: ");
Scanner inputFigure = new Scanner (System.in);
int i = inputFigure.nextInt ();
if ( i<=1) {
System.out.println ("You are wonderfully made!");
}
else if (i<=2) {
System.out.println ("You are blessed!");
}
else if (i<=3) {
System.out.println ("You are Cute!");
}
else if (i<=4) {
System.out.println ("You are Beautiful!");
}
else if (i<=5) {
System.out.println ("You have a bright future!");
}
else if (i<=6) {
System.out.println ("You are Handsome!");
}
else if (i<=7) {
System.out.println ("You have a Beautiful Eyes!");
}
else if (i<=8) {
System.out.println ("You will get rich soon!");
}
else if (i<=9) {
System.out.println ("You will have 3 kids!");
}
else if (i<=10) {
System.out.println ("You will be famous star!");
}
else {
System.out.println ("Invalid Number!");
}
}
}
 
Back
Top Bottom