- 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!");
}
}
}
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!");
}
}
}