Tagged: basics

Binary to Octal Conversion

“Binary to Octal Conversion” is one of the classic programming problem for beginners. Here, we are given a Binary Number, entered by user and our task is to write a program to convert the given binary number to its equivalent octal number. Example (Binary to Octal Conversion): Binary = 100011011...

Binary to Decimal Number Conversion

“Binary to Decimal Number Conversion” is one of the classic programming problem exercise. Here, we are given a binary number, entered by user and our task is to write a program to  convert the given binary number to its equivalent decimal number. Example (Binary to Decimal Number Conversion): INPUT: Binary =...

Check Leap Year

“Check Leap Year” is a basic programming exercise problem. Here, we are given a year, entered by user and our task is to check whether an entered year is a leap year or not. Condition to Check leap year:  The primary condition for leap year is that it is divisible...

blank

Check Armstrong Number

“Check Armstrong Number” is again basic programming exercise problem for beginners. Here, we are given a number entered by user and our task is to write a program to check whether entered number is an Armstrong number or not. A number is said to be Armstrong number when sum of cubes of...

blank

Check Palindrome Number

“Check Palindrome Number” is very basic and important programming exercise problem. Here, we are given an integer, entered by user and our task is to write a program to check whether an entered number is palindromic number or not. A palindromic number is a number which is when reversed stays...

blank

Check Prime Number

“Check prime number” is again very basic problem of programming exercise. Here, we are given a number, entered by user and our task is to check whether entered number is prime number or not. Prime Number: A number is said to be prime number if it is only divisible by 1...

blank

Check odd or even number

“Check odd or even number” is a very basic programming exercise problem for beginners. Here, we are given a number, entered by user and our task is to write a program to check whether a given number is even or odd. Even number: A number which is divisible by 2. Odd...

blank

Compute LCM of Two Numbers

“Compute LCM of Two Numbers” is a basic and important programming exercise problem, Here, we are given two numbers, entered by user and our task is to compute LCM (Lowest Common Multiple) of two numbers. LCM: An LCM of two integers is a smallest possible integer which is divisible by both...

blank

Compute GCD of two Numbers

“Compute GCD of two Numbers” is a basic programming exercise problem. Here, we are given two numbers, entered by user and our task is to compute GCD (Greatest Common Divisor) between two numbers.  GCD: A GCD, also known as HCF, of two number is a largest possible number which can...

blank

Compute Factorial of a Number

“Compute Factorial of a Number” is very popular programming exercise problem for beginners. Here, we are given a number, enter by user and our task is to compute factorial of a number. Factorial of a N: N! = N*(N-1)*(N-2)*..*2*1. Example (Compute Factorial of a Number): INPUT: N = 5 OUTPUT:...