What method can I use to develop a simple C program to display the date entered (mm/dd/yy): 22/2/43
into the following format: This is the 22nd Day of February 1943?
Do I need selections statements ?
4 replies to this topic
#1
Posted 06 October 2010 - 03:53 AM
|
|
|
#3
Posted 06 October 2010 - 04:32 AM
@Nullw0rm .. Thank you very much , but is there another simple method to do it ?..I don't want to use strings.. Thanks again
#4
Posted 06 October 2010 - 05:53 AM
I would question how you would work with strings without working with strings.. Do you mean separate input, i.e. 3 integers (not a string) and you get what you want out of that? A switch/case statement would work on this, but you would need to append to a string each time you find the proper format (such as 22 into 22nd (an ordinal index), 2 into febuary (12 case statements), xx43 into 1943).
I'm not sure why you would not use it if it was the only logical choice (unless it is for an acedemic reason, an assignment, in that case you should state it)
I'm not sure why you would not use it if it was the only logical choice (unless it is for an acedemic reason, an assignment, in that case you should state it)
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#5
Posted 06 October 2010 - 06:23 AM
Nullw0rm said:
I would question how you would work with strings without working with strings.. Do you mean separate input, i.e. 3 integers (not a string) and you get what you want out of that? A switch/case statement would work on this, but you would need to append to a string each time you find the proper format (such as 22 into 22nd (an ordinal index), 2 into febuary (12 case statements), xx43 into 1943).
I'm not sure why you would not use it if it was the only logical choice (unless it is for an acedemic reason, an assignment, in that case you should state it)
I'm not sure why you would not use it if it was the only logical choice (unless it is for an acedemic reason, an assignment, in that case you should state it)
lol ! you've caught me :D.it is an assignment and the problem that we did not take strings yet so I was wondering if it will work without it. B.T.W i gonna study strings by myself and try to do it .Thanks very much for your time , I appreciate.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









