patulong naman po gawan to ng flowchart. Tyaka kung pwede po pati codes na din pano marun hahaha
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.
Sir may error. Variable input. May mali sa input 3 error syaimport java.util.Scanner;
public class Codes{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
System.out.print("Please enter a whole number:");
int input = scan.nextInt();
if(input<=12 && input>0){
System.out.println("Youre input is "+input);
}else{
System.out.println("Youre input is not a whole number.");
}
System.out.print("Please enter a number of month:");
int choice = scan.nextInt();
switch(choice){
case 1:
System.out.println("Month of Date:January "+"\nNo.of Days:31");
break;
case 2:
System.out.println("Month of Date:Febuary "+"\nNo.of Days:28");
break;
case 3:
System.out.println("Month of Date:March "+"\nNo.of Days:31");
break;
case 4:
System.out.println("Month of Date:April "+"\nNo.of Days:30");
break;
case 5:
System.out.println("Month of Date:May "+"\nNo.of Days:31");
break;
case 6:
System.out.println("Month of Date:June "+"\nNo.of Days:30");
break;
case 7:
System.out.println("Month of Date:July "+"\nNo.of Days:31");
break;
case 8:
System.out.println("Month of Date:August "+"\nNo.of Days:30");
break;
case 9:
System.out.println("Month of Date:September "+"\nNo.of Days:31");
break;
case 10:
System.out.println("Month of Date:October "+"\nNo.of Days:30");
break;
case 11:
System.out.println("Month of Date:November "+"\nNo.of Days:31");
break;
case 12:
System.out.println("Month of Dateecember "+"\nNo.of Days:30");
break;
default:
System.out.println("ERROR Wrong number");
}
}
}
//Eto po sir sana makatulong
Sige poOops ok na pala may kulang pala ako ung int input
thank you pala sa codes. Btw activity nyo din yan or ginawa mo talaga para sakin? HAHAHASige po