- My Forums
- Tiger Rant
- LSU Recruiting
- SEC Rant
- Saints Talk
- Pelicans Talk
- More Sports Board
- Fantasy Sports
- Golf Board
- Soccer Board
- O-T Lounge
- Tech Board
- Home/Garden Board
- Outdoor Board
- Health/Fitness Board
- Movie/TV Board
- Book Board
- Music Board
- Political Talk
- Money Talk
- Fark Board
- Gaming Board
- Travel Board
- Food/Drink Board
- Ticket Exchange
- TD Help Board
Customize My Forums- View All Forums
- Show Left Links
- Topic Sort Options
- Trending Topics
- Recent Topics
- Active Topics
Started By
Message
re: C# Help. I always have dumb face on.
Posted on 2/4/15 at 4:41 pm to Hu_Flung_Pu
Posted on 2/4/15 at 4:41 pm to Hu_Flung_Pu
This is just translating the requirements he gave you into syntax. Once you get more familiar with the syntax you will start to see it form as you read the requirements.
(year % 4 == 0) means that the year is divisible by 4. If anything but 0 came back it means that there is a remainder and it isn't divisible.
For the centennial we check year % 100 and then year % 400.
This mean that year is divisible by 4 and not a centennial.
(year % 4 == 0 && year % 100 != 0)
This means that year is divisible by 4 and is divisible by 400.
(year % 4 == 0 && year % 400 == 0)
So we say if either of those statements is true, then the month will have 29 days.
if((year % 4 == 0 && year % 100 != 0) || (year % 4 == 0 && year % 400 == 0))
(year % 4 == 0) means that the year is divisible by 4. If anything but 0 came back it means that there is a remainder and it isn't divisible.
For the centennial we check year % 100 and then year % 400.
This mean that year is divisible by 4 and not a centennial.
(year % 4 == 0 && year % 100 != 0)
This means that year is divisible by 4 and is divisible by 400.
(year % 4 == 0 && year % 400 == 0)
So we say if either of those statements is true, then the month will have 29 days.
if((year % 4 == 0 && year % 100 != 0) || (year % 4 == 0 && year % 400 == 0))
Popular
Back to top
Follow TigerDroppings for LSU Football News