What Did I Learn?

I learned all about making Linodes. They are really cool online computers that get to host all sorts of stuff online, accessed remotely.

What we learned?

Leap Year Program with Bash Shell Scripting in Windows

What Can You Do With These?

LITERALLY, ANYTHING Imagine a computer. You can do all that. Remotely. From anywhere.

Concept

Every year is a Leap year if it is evenly divided by four. Every year evenly divided by 100 BUT not 400 is also a leap year.

Code

echo -n "Enter year (YYYY): "
read y
a = 'expr $y%4'
b = 'expr $y%100'
c = 'expr $y%400'
if[$a -eq 0 -a $b -ne - -o $c -eq 0]
then
echo "$y is leap year"
else
echo "$y is not a leap year"
fi

Output

Input: 2024 Output: "2024 is leap year"

Built With

Share this project:

Updates

Submission history