Marketplace
Related Articles
Related Categories
Recently Added
- Tips For English Writing
- Picture Writing Prompts For First Grade
- How To Do A Resume
- Essay Writing Competition 2010
- Essay Tips Writing
- How To Write An Essay
- Writing Jobs In Philadelphia
- How To Learn English
- Freelance Writing Jobs Available
- Freelance Writing Job Openings
- Freelance Humor Writing Jobs
- How To Get A Job Writing Greeting Cards
- Seo Article Writing Jobs
- Blog Writing Jobs In India
- How To Get A Job Writing Jingles
- Writing Jobs London Uk
- Ebook Writing Jobs
- Home Based Writing Jobs In India
- Freelance Writing Job Search
- Nature Writing Jobs
Join StudyUp.com Today
You Recently Visited
End Of The Year Writing Prompts
Curtis Said:
Java Programming- Finding the number of days in a month-?We Answered:
import java.util.Scanner;public class Practice3{
public static void main(String args []){
//create scanner
Scanner input = new Scanner(System.in);
System.out.print("Enter a year:");
int year = input.nextInt(); //Moved here to get input after the question is asked
System.out.print("Enter a month:");
int month = input.nextInt(); //Moved here to get input after the question is asked
int days = 0; //changed so that it just initializes the variable to zero
boolean isLeapYear = (year % 4 == 0 && year % 100 != 0)||(year % 400 == 0);
switch (month){
case 1:
days = 31;
break;
case 2:
if (isLeapYear)
days = 29;
else
days = 28;
break;
case 3:
days = 31;
break;
case 4:
days = 30;
break;
case 5:
days = 31;
break;
case 6:
days = 30;
break;
case 7:
days = 31;
break;
case 8:
days = 31;
break;
case 9:
days = 30;
break;
case 10:
days = 31;
break;
case 11:
days = 30;
break;
case 12:
days = 31;
break;
default:
if ((month < 1)||(month > 12))
System.exit(0);
}
//moved here so that the answer is printed after days has been calculated
String response = "There are " +days+ " in month "+month+ " of " +year+ ".n";
System.out.println(response); // new line to show the result to the screen.
}
}
this should work for you! my JDK is acting up, so I can't test it... but if you have any problems just get back to me and I'll let you know what the problem is!
my email address is rjf1986@yahoo.co.uk if you have any queries in future!!
good luck :D
Eleanor Said:
Please proof 500-word writing prompt for my job application!?We Answered:
The introduction should not have capitals for small and organising*, it is a paragraph heading, not the main title.4th paragraph - you have “toss.” This should be "toss". BUT remember that you have already stated that this bag is labeled TOSS, so it should appear as "TOSS".
"keep" appears twice - "KEEP" should be used because that is how you stated it initially.
Small items with similar purposes (like buttons, for example) - if you are going to give an example of item(s) with a similar purpose, you must list at least two !
Congratulations! - there should be space, Congratulations !
home! - there should be a space, home !
*uk spelling.