Perfect Number Program in C++

What is a Perfect number: Perfect Number is a number in which sum of all its positive divisors excluding that number is equals to the number. For example:     6 Sum of divisors = 1+2+3 = 6 Here we will find perfect numbers between 1 and 500. Program explanation: 1. Take first number as … Read more

Program to Print Fibonacci Series in C++

What is Fibonacci Series? In mathematics, the Fibonacci numbers or Fibonacci sequence are the numbers in the following integer sequence: or (often, in modern usage): (sequence A000045 in OEIS). By definition, the first two numbers in the Fibonacci sequence are either 1 and 1, or 0 and 1, depending on the chosen starting point of … Read more

Write a C++ program to Make Calculator

Here is the Simple C++ Program to make Calculator PROGRAM: #include <cstdio> #include <cstdlib> #include <iostream> using namespace std; int main(int nNumberofArgs, char* pszArgs[]) { // enter operand1 op operand2 int nOperand1; int nOperand2; char cOperator; cout << "Enter 'value1 op value2'n" << "where op is +, -, *, / or %:" << endl; cin … Read more

C++ Program to check Prime number

Today we are going to write a C++ program to check if a number is a Prime number i.e. if a number enter by user is a prime number or not. We all know what a Prime number is let’s recall quickly: Prime Number: A number which is divisible by 1 and itself is called … Read more