Sum of squares of even numbers from 1 to N
PHP
Easy
loops
Task «Sum of squares of even numbers from 1 to N»
Write a program that takes a positive integer N and calculates the sum of squares of all even numbers from 1 to N inclusive. If N is less than 1, output 0. Use a for or while loop.
Input Format
Integer N, entered on a new line.
Output Format
An integer is the sum of squares of even numbers from 1 to N.
Examples
Example 1
INPUT
10
OUTPUT
220
Example 2
INPUT
1
OUTPUT
0
main.php