🔒 Closed Flowchart

Status
Not open for further replies.

Falln

Forum Veteran
patulong naman po gawan to ng flowchart. Tyaka kung pwede po pati codes na din pano marun hahaha
 

Attachments

  • IMG_20191007_113441.webp
    IMG_20191007_113441.webp
    107.7 KB · Views: 15
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 Date:December "+"\nNo.of Days:30");
break;
default:
System.out.println("ERROR Wrong number");
}

}

}

//Eto po sir sana makatulong
 

Attachments

  • Screenshot from 2019-10-08 09-24-43.webp
    Screenshot from 2019-10-08 09-24-43.webp
    172 KB · Views: 9
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 Date:December "+"\nNo.of Days:30");
break;
default:
System.out.println("ERROR Wrong number");
}

}

}

//Eto po sir sana makatulong
Sir may error. Variable input. May mali sa input 3 error sya
 
Status
Not open for further replies.

About this Thread

  • 5
    Replies
  • 538
    Views
  • 2
    Participants
Last reply from:
Falln

Trending Topics

Online now

Members online
632
Guests online
860
Total visitors
1,492

Forum statistics

Threads
2,280,347
Posts
28,996,715
Members
1,226,734
Latest member
Tempest1294
Back
Top