Hello, I am working on a program that is quite complicated and need help with a few things.
2 things I need to know.
If the user inputs a year, I need a particular function to divide the first two digits of the year by 4. How do I get the function to only take in the first 2 digits? - SOLVED!
How do I throw a bunch of void functions together in a single function?
Edit:
Also, I need to detect if the year is a leap year, it needs to check if the year is divisible by 4 and not divisible by 100, how can I have the program detect this?
Edit...again:
I also need to take the final 2 digits of any year and use it to calculate year value, problem is, I do not know how to isolate the last 2 to be used in an algorithm.
VALID POINT: I can't use library functions.
2 things I need to know.
If the user inputs a year, I need a particular function to divide the first two digits of the year by 4. How do I get the function to only take in the first 2 digits? - SOLVED!
How do I throw a bunch of void functions together in a single function?
Edit:
Also, I need to detect if the year is a leap year, it needs to check if the year is divisible by 4 and not divisible by 100, how can I have the program detect this?
Edit...again:
I also need to take the final 2 digits of any year and use it to calculate year value, problem is, I do not know how to isolate the last 2 to be used in an algorithm.
VALID POINT: I can't use library functions.