Ask Experts Questions for FREE Help!
  Advanced
Register  |  Log in  
   Ask    
 Answer  
  Help  

Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
Free Answers in 3 Easy Steps

Register Now
3 Steps

At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.

Home > Computers & Technology > Programming > Compiled Languages > C   »   Input format in C

 
Question Tools Search this Question Display Modes
Question
 
 
#1  
Old Jan 28, 2007, 06:41 AM
Captain Outrageous's Avatar
Captain Outrageous
New Member
Captain Outrageous is offline
 
Join Date: Aug 2005
Posts: 9
Captain Outrageous See this member's comment history on his/her Profile page.
Input format in C

In C programming, I am trying to force the user to enter a date in the format DD/MM/YYYY, and I want to make sure they input leading zeros if the day or month is less than 10. Is there any way to do this?

Thanks

Reply With Quote
 
     

Answers
 
 
Old Jan 29, 2007, 07:28 AM   #2  
asterisk_man
Full Member
asterisk_man is offline
 
asterisk_man's Avatar
 
Join Date: Nov 2006
Location: East coast of U.S.A.
Posts: 472
asterisk_man See this member's comment history on his/her Profile page.
1 prompt them with the correct format
2 read their input
3 validate their input against the correct format
4 if their input is invalid give an error message and return to 1

Comments on this post
Captain Outrageous disagrees: It did not answer the question to a great enough depth
  Reply With Quote
 
     
 
 
Old Jan 31, 2007, 06:22 AM   #3  
asterisk_man
Full Member
asterisk_man is offline
 
asterisk_man's Avatar
 
Join Date: Nov 2006
Location: East coast of U.S.A.
Posts: 472
asterisk_man See this member's comment history on his/her Profile page.
If you dislike my answer please explain which portion you need more information on. You asked "Is there any way to do this?" and I wrote you pseudocode that would accomplish your task.
I assumed, based on the simplicity of your question, that it was probably a homework assignment of some form.
You gave me negative reputation but you wanted more info, my answer was not wrong.
We can continue to work on this question if you're still interested. You can post what code you have if you want or tell me which of my 4 steps you're having trouble with.
  Reply With Quote
 
     
 
 
Old Jan 31, 2007, 06:26 AM   #4  
ScottGem
Computer Expert
ScottGem is online now
 
ScottGem's Avatar
 
Join Date: Jan 2003
Location: LI, NY - USA
Posts: 23,138
ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.
Pay to call ScottGem for advice ($.75/min)
Call ScottGem via Skype™
May I point the suggested guidelines for using the comments feature found here:

http://www.askmehelpdesk.com/feedbac...ure-24951.html

You asked; "Is there any way to do this?" A valid answer would have been simply Yes. not only did you get that answer, but you got the steps needed. If you wanted the actual code to do it, you should have asked for that. I think you owe Asterisk_man an apology.
  Reply With Quote
 
     


Question Tools Search this Question
Search this Question:

Advanced Search
Display Modes

 
Similar Sponsors

Similar Questions
Question Asker Topic Answers Last Post
What the possibility? I really need some input! tabatha424 Women's Health 4 Nov 24, 2006 06:16 AM
citizens input shante High School 1 Nov 2, 2006 06:37 PM
A little break-up input please.... Racer1880 Relationships 8 Aug 29, 2006 07:56 AM
Input: When Debates Erupt RickJ Other Member Discussions 26 May 29, 2006 08:09 PM
Ok i need some outside input ca79girl Relationships 10 Dec 31, 2005 08:22 AM




Copyright ©2003 - 2007, Ask Me Help Desk.
All times are GMT -8. The time now is 12:10 PM.

Content Relevant URLs by vBSEO 3.0.0 RC6 © 2006, Crawlability, Inc.