Ruby
xxxxxxxxxx
puts "Enter the year you want to check"
yr = gets.chomp.to_i
if yr % 400 == 0
puts "#{yr} is a leap year"
elsif yr % 4 == 0 && yr % 100 !=0
puts "#{yr} is a leap year"
else
puts "#{yr} is not a leap year"
end
Enter the year you want to check 2022 2022 is a leap year
Linux - 如何安装 anc-api-tools
Linux - 如何安装 curvedns
Python - 检查数字是正数、负数还是 0
Linux - 如何安装 zenmap
C - 计算整数中的位数
C++ - 检查闰年
JavaScript - 检查字符串是否以某些字符开头和结尾
C++ - 检查一个数字是否是素数
Kotlin - 将数字四舍五入到 n 个小数位
Linux - 如何安装 xbitmaps
C - 使用动态内存分配查找最大数
Kotlin - 反转数字
Linux - 如何安装 zstd
Linux - 如何安装 zfs-test
Java - 反转数字
Linux - 如何安装 zookeeper-bin
Python - 编写 Excel (XLSX) 文件
C++ - 求商和余数
We have been online since 2021 and 1 millions of people around the globe have visited our website since then
More visitors every month