Task 2: Fundamental Programming -Sum of Digits — Take an integer N and print the sum of its digits, Leap Year Checker — Check if a given year is a leap year, reverse a word — using loops (no built-in functions).
To find the sum of digits: example: input:if the input 16 is given- output: 1+6=7
For checking the leap year,the condition should be the year which the user given should be either divisible by 4 and 400 but it should not be divisible by 100 example: 2024 is leap year since it is divisible by 4 but,when the input is 1900,it is not a leap year because it is divisible by 100.
When the user(input) gives:
THE STRING :HELLO
THE OUTPUT :OLLEH