Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 20th, 2005, 07:06 AM
Registered User
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default if / else problem...

As I am novice to C++, I would like to get help from the experts writing simple program for the following problem...

Write a C++ program that reads a month number as an integer (form 1 to 12) and a d ay number as an integer (form 1 to 31).
If the month entered is not between 1 and 12 inclusive, print a message informing the user that an invalid month has been entered. If the day entered is not between 1 and 31 inclusive, print a message informing the user that an invalid day has been entered.

If no error messages are displayed, print “Winter” if the month is in the range 1-3, “Spring” if the month is in the range 4-6, “Summer” if the month is in the range 7-9, and “Autumn” otherwise.


Thank you...

 
Old March 21st, 2005, 10:16 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

You are posting to the wrong forum. This is the VB.Net forum.
 
Old March 21st, 2005, 07:03 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Sounds like a homework problem to me...









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.