HCF ( Highest Common Factor): The LCM of 2 numbers is Highest common factor of those numbers. For e.g. we have 20 and 30, so HCF will be 10, as 10 is the highest common factor of 20 as well as 30. You must know how to calculate HCF of numbers. LCM ( Lowest […]

## C++ Program to check Prime number

Today we are going to write a C++ program to check Prime number i.e. if a number enter by user is a prime number or not. We all know what a Prime number is let’s recall quickly: Prime Number: A number which is divisible by 1 and itself is called Prime number i.e. it do […]

## C++ Program to swap two numbers without using temporary variable

Today we are going to write a C++ program to swap two numbers without using any temporary variable, let’s start. There are many ways to swap two numbers without using a Temporary variable. Here I’ve discussed two methods: Using ‘+’ and ‘-‘ operators. Using Bitwise XOR ‘^’. So here’s the First Program: C++ Program […]