F Falln Forum Veteran Joined Mar 16, 2016 Posts 1,883 Reaction 280 Points 742 Oct 7, 2019 #1 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.
X xElectro Eternal Poster Established Oct 8, 2019 #2 import 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 Attachments You do not have permission to view the full content of this post. Log in or register now.
import 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
F Falln Forum Veteran Oct 8, 2019 TS TS #3 xElectro said: import 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 Click to expand... Sir may error. Variable input. May mali sa input 3 error sya
xElectro said: import 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 Click to expand... Sir may error. Variable input. May mali sa input 3 error sya
X xElectro Eternal Poster Established Oct 8, 2019 #5 boszken said: Oops ok na pala may kulang pala ako ung int input Click to expand... Sige po
F Falln Forum Veteran Oct 8, 2019 TS TS #6 xElectro said: Sige po Click to expand... thank you pala sa codes. Btw activity nyo din yan or ginawa mo talaga para sakin? HAHAHA
xElectro said: Sige po Click to expand... thank you pala sa codes. Btw activity nyo din yan or ginawa mo talaga para sakin? HAHAHA