Translation:
Wahhh! You expect me to actually think! You're mean! You won't give me teh codez!!!
Cya, although I'm sure you'll be back to try again.
Translation:
Wahhh! You expect me to actually think! You're mean! You won't give me teh codez!!!
Cya, although I'm sure you'll be back to try again.
wgh : i think ur mistaken, i never said write whole program for me.. i can already write that.. i was asking for the line code only for this logic but anywy np.. no one here actually knows how to help but Elysiaa or something.. i forgot his nick but he's a gr8 helper always helped ..
Listen listen,
these people really want to help you. Help you to become a great programmer. They do so by making you solve your own problem - by giving you hints an direction, just like a real teacher would.
Now, I hope you know how to write pseudo code or flow charts?
I suggest you try. Try to write down the logic in your mind.
Try to figure out how you would do if someone gave you 3:65:05.
Let your brain do the work.
Once you've written a flowchart and pseudo code, you can translate it into actual C++ code. This is the basic step you're taught in programming.
Somthing like that.Code:int checkTimeSeconds ( int sec ) { if ( sec > 60 ) { m_Seconds = 10; // default value } else { m_Seconds = sec; } return m_Seconds; }
Double Helix STL
i know whats a flowchart but whats a pseudo code exactly? b tw reply my pm please ;p
ah ok thanks, will try :P thanks
Not what he wants to hear. He just wants someone to do his work for him. Has he shown any effort whatsoever?
I actually thought he had already done this in the OP. However, it now seems the exact scenario quoted was likely spoon-fed as a requirement to him prior to arriving here.
Here is what I would do:
Ex:
given time: 3:65:00 (hours = 3, minutes = 65)
should be: 4:05:00 (hours = 4, minutes = 5)
if minutes > 60
hours = hours + minutes / 60
minutes = minutes % 60
65 % 60 = 5 (the minutes should be this)
65 / 60 = 1 (add this to the hours) (*Note:must be declared as an int).
Although there are other ways to do this (and declaring it as an int is probably considered bad practice), this would work.
IDE - Visual Studio 2005
Windows XP Pro