Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

UCEP Institute of Science and Technology

Programming Contest 2024

Practice Sheet

1. Basic Syntax and Simple Calculations

1. Hello World: Write a program that prints "Hello, World!" to the console.
2. Sum of Two Numbers: Given two numbers, calculate their sum.
3. Leap Year: Write a program to check if a given year is a leap year.
4. Simple Calculator: Create a simple calculator that can add, subtract, multiply, and
divide two numbers.

2. Conditional Statements

1. Maximum of Three Numbers: Write a program to find the maximum of three


numbers.
2. Odd or Even: Check if a given number is odd or even.
3. Grade Calculation: Given a score, print the corresponding grade (A, B, C, D, F).

3. Loops

1. Factorial: Calculate the factorial of a given number.


2. Fibonacci Sequence: Print the first N terms of the Fibonacci sequence.
3. Prime Numbers: Check if a given number is prime and print all prime numbers up to
N.

4. Arrays and Strings

1. Array Sum: Given an array of integers, find the sum of its elements.
2. Reverse Array: Reverse the elements of an array.
3. Palindrome String: Check if a given string is a palindrome.
4. Character Frequency: Count the frequency of each character in a string.

5. Functions

1. GCD and LCM: Write functions to compute the greatest common divisor (GCD) and
least common multiple (LCM) of two numbers.
2. Prime Check Function: Write a function to check if a number is prime.
3. Fibonacci Using Recursion: Implement a recursive function to generate Fibonacci
numbers.

Designed by Delower Hossain

01743028754(WhatsApp)

You might also like