In this tutorial we are writing a C++ Program to Check Eligibility for voting. To check that a person is eligible for voting or not, we need to check whether person’s age is greater than or equal to 18. For...
Tag - C++ Examples
Cpp code to print right triangle shape using nested for loops
In this tutorial, we will learn about the triangle Number pattern using nested loop in Cpp language. We can use nested for loop in C++ to write coding for Squares, rectangles, Floyed triangle, Pyramid triangles and many other...
Cpp Program To Pyramid Number Pattern
In this tutorial, we will discuss the Cpp program to pyramid number pattern In this topic, we will learn how to create number pattern in C++ language using for loop and while loop pyramid number pattern programs in C++language...
Add two Numbers (Integer/Decimal) in C++
In this program, i’ll show you how to add two Numbers in C++ programming language. To add two numbers in C++, we will ask the user to enter the two number and place the addition of the two number in sum variable of...
Calculate the Sum of Numbers From 1 to 100 in C++
The example programs will show you how to calculate the sum of numbers from 1 to 100 in C++. Using for loop C++ #include <iostream> using namespace std; int main() { int sum=0; for(int i=1; i<=100; i++) { // adding 1 to...
Print Numbers From 1 to 100 Using for Loop in C++
This is a C++ Program to Display Numbers from 1 to 100 Using For Loop. We use For Loop in which we initialise a variable to 1 and increments each time by 1 till we reach 100. The loop breaks when variable attains value 11. Here...
Print Numbers From 1 to 10 Using for Loop in C++
This is a C++ Program to Display Numbers from 1 to 10 Using For Loop. We use For Loop in which we initialise a variable to 1 and increments each time by 1 till we reach 10. The loop breaks when variable attains value 11. Here is...
C++ program to store information of a student in a structure with for loop
In this article, you will learn how to make a C++ program to store information of a student in a structure with for loop in the c++ programming language. You should have knowledge of the following topics in c++ programming to...
Butterfly Pattern in C++ language of the numbers using for loop
In this article, you will learn how to print the Butterfly Pattern in C++ language of the numbers using for loop statement. TeX -----Enter the height of the pattern----- 6 -----This the butterfly pattern----- 1 1 1 2 2 1 1 2 3 3...
C++ Program to Print the Fibonacci Sequence
In this program, we will learn how to make a C++ program of printing the Fibonacci Sequence. We will be learning two ways to make this program. Printing Fibonacci Sequence using loop Printing Fibonacci Sequence using Recursion...