New Member FAQ | Forums | Earn Revenue


Resources Entrance Ask Experts Exam Papers Jobs English Projects Universities Colleges Courses Schools Training My India



My Profile
Active Members
TodayLast 7 Days more...



Awards & Gifts
Online Exams

Fresher Jobs


Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi

Resources


Find educational articles, blogs, discussion threads and other resources.

Colleges


Find details about any college in India or search for courses.

website counter



Using a SWITCH statement display the DAYS in a MONTH


Posted Date:     Total Responses: 0    Posted By: Sunil Reddy   Member Level: Platinum   Points/Cash: 3   


using System;
class FallThrough
{
public static void Main(string ar[])
{
if(ar.Length != 1) return;
int nMonth = Int32.Parse(ar[0]);
if(nMonth < 1 || nMonth > 12) return;
int nDays = 0;
switch(nMonth)
{
case 2: nDays = 28; break;
case 4:
case 6:
case 9:
case 11: nDays = 30; break;
default : nDays = 31;
}
Console.WriteLine("{0} days in this Month", nDays);
Console.ReadLine( " ");
}
}



Project Feedbacks


No feedbacks found. Be the first to respond and make money from revenue sharing program.

Post Feedback
You must Sign In to post a feedback.
Next Project: DETERMINING THE CASE OF A LETTER
Previous Project: Computing a factorial in a for loop

Return to Project Index

Post New Project


Related Projects



Advertise Here





Contact Us   Advertise   Editors    Privacy Policy    Terms Of Use   

ISC Technologies.
2006 - 2009 All Rights Reserved.