PDA

View Full Version : C-Programing code help!!


devilztym
03-30-2009, 10:11 AM
Hi, everyone. Thanks in advance.:D
I am a Student (First Year) doing computer Engineering. We are being tought C-programming at the University. As I am not from an english speeking country its difficult for me to keep up to our lectures. Hence I need help.

Problem::confused:I have to write a program in C-language. In which when we give input as DD/MM/YYYY (any date). the output should be in words.
Eg.
Input - 30/03/2009
Output-
Thirtieth
March
Two Thousand Nine
Monday

I dont want the exact solution:rolleyes:. Rather I want to develove the code all by my self. What I need is, for all of you to guide me to my solution.
I have simple basic knowledge of C. We have covered topics like.
Printf, scanf, %d,f,c if statement, while loop, for loop, etc.:thumbsup:

oracleguy
03-31-2009, 05:10 AM
Well why don't you post the code you have written thus far and ask specific questions on the areas you are stuck on?

it career
03-31-2009, 09:23 AM
You need to maintain array of strings like char day[][20]={ "First",...."Thirty first" }, etc.

Spider7
03-31-2009, 05:34 PM
I like the way you asked your question. I'll start with high level, please ask if you need more help.

The problem as I see, is to translate from numbers to words, and the translation is different for day, month and year.