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...

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...

Converting lowercase to uppercase in C++

Here we are converting lowercase to uppercase in C++ by using an additional library in our includes;Here is a code which is able of converting a string from lowercase to uppercase: // converting lowercase to uppercase in C++ #include <iostream> #include <cctype> using namespace std; void convertToUppercase( char * );   int main() {     char phrase = "characters and $32.98";     cout << "The phrase before conversion is: " << phrase;     convertToUppercase( phrase );     cout << "nThe phrase after conversion is:  "         << phrase << endl;     return 0;  // indicates successful termination }   // convert string to uppercase letters void convertToUppercase( char *sPtr ) {     while ( *sPtr != '' ) {   // current character is not ''         if ( islower( *sPtr ) )  // if character is lowercase,             *sPtr = toupper( *sPtr );  // convert to uppercase         ++sPtr;  // move sPtr to next character in string     } } in...

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++,...

Pointers in C++

Pointers in C++ are the variables that contain memory addresses as their values. Normally, a variable directly contains a specific value. A pointer contains the memory address of a variable that,...

Drawing a Triangle in Console window

Here is a C++ code containing nested loops which is able of drawing a triangle in your console window.We can use loops easily to draw many structures in our console window,...

Fibonacci Number program in C++ using Recursion

This program shows A Fibonacci Sequence starting from a user's entered number, the approach used here is recursive.Have a look at the code: //febonacci using recursion ...

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...

Creating a Timer in C++

Creating a timer means creating a digital watch, simply. A Digital watch is the one that counts and shows the time in form of digits, In our daily bases software Programming...

Calculation of Summation in C++

In Mathematics we have studied "SUMMATION". the below example provides you the C++ code to find summation of several numbers in C++. We can take the inputs from the user to...