Program for Palindrome in C++

Palindrome is a word that reads the same forward or backward. Now how can we check a string that it is a palindrome or not? We can do it by using...

Overloading steam insertion and extraction operators in C++

For putting data into the stream and getting data from the stream, the stream insertion and extraction operators are used, Now these operators are already defined for defined datatypes in C++,...

Area and Perimeter of rectangle in C++

Area and Perimeter both are the mathematical terms used with rectangle, area is the length multiplied by width while perimeter is the length of all sides of the rectangle. Now how...

Hello World in C++

The Hello world program is a simple computer program that prints (or displays) the string "Hello, world!" or some variant thereof. It is typically one of the simplest programs possible...

C++ Program to find largest of 3 numbers

In C++ we can implement a logic to write a program to find largest of 3 numbers. So for finding maximum number from given two, three or more numbers, this is...

Finding Length of a string in C++

Sometimes we have strings entered by the user and we need to find out the length of a string or size of that length of a string to be used further....

Recursive factorial function in C++

Here we are going to define our recursive factorial function in C++: #include <iostream> using namespace std; int factorial(int n) // 1, 1, 2, 6,...

Generation of Prime Numbers in C++

Implementing the logic of Prime Numbers into our c++ code, we need simple for loops and conditional statements. This is very easy to implement and print Prime Numbers upto 1000. Lets...

Fractional Calculator in C++

We can easily use structures to create a fractional calculator than can solve fractional numbers in C++. It is just an easy approach through structures, we can easily create a simple...

Control structures in C++

Control structures in C++ also called the decision makers. In C++ We have control structures which are helpful in programs which needs a little bit concept of decision making between different...