This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • Post Reply Bookmark Topic Watch Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Leap

 
Ranch Foreman
Posts: 810
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This page was migrated from a javaranch.com.jsp


Assignment <font color="#008800">Java-3</font> (Leap)
<i>Purpose:  To learn to use boolean logic and proper commenting.</i>

 <p>Write a program that will read in a year and report if it is a leap year. The tricky
 thing here is that a leap year occurs: <ul>
   <p>on every year that is evenly divisible by 4 <ul>
     <p>except every year that is evenly divisible by 100 <ul>
       <p>except every year that is evenly divisible by 400. </p>
     </ul>
   </ul>
 </ul>
 <p>In other words, I want to type </p>
 
 <p>and see </p>
 
 <p>or, if I type </p>
 
 <p>I want to see</p>
 
 <p>Everything you need to know to do this assigment was covered in previous assignments. </p>
 <p>Instructor's solution:</p>
 <ul>31 total lines</ul><p>


Good for you! Now that you have tied up this assignment, lasso the next one.
<ul>
 Assignment Java-4 (Say)</ul>
     
     
     



     <p>Page maintained by
     Marilyn de Queiroz<p>
 
I do some of my very best work in water. Like this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!