Problems for Beginners

Copycat

Read an integer variable and print it.

Add Them Up

Read two integer variables, calculate their sum, and print it.

Squared

Given the length of a side of a square, calculate and print its ...

Pie Are Squared

Given the radius of a circle, calculate and print its area. The...

Missing Number

Given the sum of four numbers and three of those numbers, find t...

Maximum

Given N numbers, find the one that is of the highest value and p...

Mixed Fractions

Given an improper fraction (as the numerator N and the denominat...

Running Average

Given N numbers, read each one, calculate the running average an...

Running Average Again

Given N numbers, read each one, calculate the running average an...

Math and Watermelons

Your friend has M watermelons. He doesn’t want to share them wit...

Formatted Numbers

Read an integer variable and print it in which the digits are se...

Is Palindrome

Given a word, print “Yes” if it is a palindrome, otherwise “No”....

Clock Math

Given a time (hours as H and minutes as M), determine the smalle...

Divisors

Read an integer variable and print all of its divisors (includin...

Making Friends

Byang is going to join a new school. His new class has N student...

Is Anagram

An anagram is a word formed by rearranging the letters of anothe...

Is Prime

Given an integer N, determine if it is a prime a number. A numb...

Fibonacci Numbers

Given an integer N, print the Nth Fibonacci number. A Fibonacci...

Leap Years

In the Gregorian calendar, certain years have 366 days instead o...

Incompatible Crops

Did you know that certain crops cannot grow next to each other? ...

Big Factorials

Given an integer N, print the trailing 4 digits of $ N! $ (N fac...

Full Pyramid

Given an integer N, print a full pyramid of asterisks. A full p...

Pascal's Triangle

Given an integer N, print the sum of the Nth row of the Pascal’s...