- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Samual Sam has Published 2492 Articles
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
1K+ Views
There are many different pyramid patterns that can be created in C++. These are mostly created using nested for loops. Some of the pyramids that can be created are as follows.Basic Pyramid PatternThe code to create a basic pyramid is given as follows.Example Live Demo#include using namespace std; int main() ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
2K+ Views
The natural numbers are the positive integers starting from 1.The sequence of natural numbers is −1, 2, 3, 4, 5, 6, 7, 8, 9, 10……The program to find the sum of first n natural numbers using recursion is as follows.Example Live Demo#include using namespace std; int sum(int n) { ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
7K+ Views
Average of numbers is calculated by adding all the numbers and then dividing the sum by count of numbers available.An example of this is as follows.The numbers whose average is to be calculated are: 10, 5, 32, 4, 9 Sum of numbers = 60 Average of numbers = 60/5 = ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
4K+ Views
A matrix is a rectangular array of numbers that is arranged in the form of rows and columns.An example of a matrix is as follows.A 3*3 matrix has 3 rows and 3 columns as shown below −8 6 3 7 1 9 5 1 9A program that multiplies two matrices ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
2K+ Views
Operator overloading can be done with most of the built-in operators in C++. The overloaded operators are functions with the keyword operator followed by the operator symbol that is defined. The overloaded operators have a return type and a parameter list like any function.A program that subtracts complex numbers using ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
2K+ Views
Multiplication of two numbers a and b yields their product. Value of a is added as many times as the value of b to get the product of a and b.For example.5 * 4 = 20 7 * 8 = 56 9 * 9 = 81Program to Multiply two Numbers ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
5K+ Views
A prime number is a whole number that is greater than one and the only factors of a prime number should be one and itself.Some of the first prime numbers are −2, 3, 5, 7, 11, 13 ,17A program to check if a number is prime or not using a ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
1K+ Views
Factorial of a non-negative integer n is the product of all the positive integers that are less than or equal to n.For example: The factorial of 7 is 5040.7! = 7 * 6 * 5 * 4 * 3 * 2 *1 7! = 5040Let us see the code to ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
2K+ Views
In a computer system, the binary number is expressed in the binary numeral system while the decimal number is in the decimal numeral system. The binary number is in base 2 while the decimal number is in base 10.Examples of decimal numbers and their corresponding binary numbers are as follows ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
2K+ Views
The natural numbers are the positive integers starting from 1.The sequence of natural numbers is −1, 2, 3, 4, 5, 6, 7, 8, 9, 10……Sum of the first n natural numbers can be calculated using the for loop or the formula.Programs specifying both of these methods are given as follows ... Read More