Exforsys

Online Training

Display Year&Month Program

This is a discussion on Display Year&Month Program within the C and C++ forums, part of the Programming Talk category; Help me to write code for this program.which display year,month & day presents in a year for example. ...


Go Back   Exforsys > Programming Talk > C and C++

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-09-2006, 02:13 AM
Junior Member
 
Join Date: Apr 2006
Posts: 25
Limca is on a distinguished road
Display Year&Month Program

Help me to write code for this program.which display year,month & day presents in a year for example.
1. no. is 14 print 2 weeks
2. no is 90 print 3 months
3. no is 365 print 1 year
user can input any no?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-09-2006, 04:19 PM
Junior Member
 
Join Date: Dec 2006
Posts: 27
Quozty is on a distinguished road
the only thing I could think of is a very long winded

CASE and Switch statement

if < 14 days

or something like that
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-10-2006, 04:00 AM
Senior Member
 
Join Date: Apr 2006
Posts: 162
sammy is on a distinguished road
You could have a function to determine the number of days and return the value to the switch case statement and take action of printing as per the result from the function.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 12-25-2006, 10:44 PM
Senior Member
 
Join Date: Apr 2006
Posts: 145
Rahulbatra is on a distinguished road
Limca did you try the suggestions. Even if you have tried anything else do post here so that we could know how you got your result.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit Tech FAQ 0 06-01-2004 07:00 AM
comp.cad.autocad AutoLISP FAQ (part 1/2) - general Reini Urban Tech FAQ 0 06-01-2004 06:30 AM
comp.cad.autocad AutoLISP FAQ (part 1/2) - general Reini Urban Tech FAQ 0 05-01-2004 06:30 AM
Solaris x86 FAQ 2/2 Dan Anderson Tech FAQ 0 04-27-2004 08:24 PM
Apple II Csa2 FAQs: Telecom Hardware & Transfers, Part 20/25 rubywand@swbell.net Tech FAQ 0 04-04-2004 08:29 AM


All times are GMT -4. The time now is 04:37 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.