What's new

Closed Flowchart

Status
Not open for further replies.

Falln

Forum Veteran
Joined
Mar 16, 2016
Posts
1,883
Reaction
280
Points
742
patulong naman po gawan to ng flowchart. Tyaka kung pwede po pati codes na din pano marun hahaha
 

Attachments

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

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.

Similar threads

Back
Top