C++ Examples – Programming, Pseudocode Example, C# Programming Example

Tag - C++ Examples


C++ Program to calculate Simple Interest

In this post, we will be learning how to write a C++ Program to Calculate Simple Interest of the given values of Principle, Time and Rate. The formula to Calculate Simple Interest To calculate S.I, we have a formula: INI S.I =...


C++ Program to print Hello World

In this program, we will print the hello world on the output screen. We will use cout object of class ostream and also have used // symbol to use comments in C++ to tell what that particular statement does. We will print it in...


Convert Binary to Decimal in C++

In this example, i’ll show you How to Convert Binary to Decimal in C++. C++ Code: C++ // C++ program to convert binary to decimal #include <iostream> using namespace std; // Function to convert binary to decimal int...


Calculate the Factorial of a Number in C++

The factorial of a number is defined is the product of natural numbers from one to that particular number. Mathematically, n! = 1 * 2 * 3 * …. * (n-1) * n For example, the factorial of 5 is 5! = 1 * 2 * 3 * 4 *5= 120 This article...


Check Leap Year in C++

This C++ Program Checks Whether the Entered Year is a Leap Year or Not. One year has the length of 365 days, 5 hours, 48 minutes and 45 seconds.This is hard to calculate with, so a normal year has been given 365 days and a leap...


Calculate the Power of a Number in C++

In this program, you’ll learn to calculate the power of a number with and without using pow() function. Example 1: Calculate power of a number using a for loop C++ Code: C++ #include <iostream> using namespace std;...