Basic program

Check for palindrome number

A palindrome number is a number that remains the same when digits are reversed. For example, the number 125521 is a palindrome…

2 years ago

Find Max Number Among the Given Three Number Using If/Else Statements

n1 is compared to n2. If n1 is larger than n2, it is compared to n3. If it is greater than n3…

2 years ago

Check for Prime number

A prime number is greater than one and can be divided by one or itself. In other words, prime numbers…

2 years ago

Pascals triangle

Pascals triangle is a triangular array of binomial coefficients. The numbers outside Pascals triangle are all "0". These "0s" are…

2 years ago

Sum Of Series 1 + 2 + 4 + 8 + 16 + 32 + . . n

Program code: #include <iostream> #include <math.h> using namespace std; //calculating the sum of the series double calc_sum(int n) { int…

2 years ago

Sum Of Series 1 + 1 / 2 ^ 2 +. . . . 1 / n ^ n

A program to compute the sum of a given series 1 + 1/2^2 + 1/3^3 + …..+ 1/n^n. For this,…

2 years ago

Sum Of Series 1 + 2 + 3 + 4 + 5 + 6 . . . . n

The sum of a series consisting of n terms beginning with "1," is equivalent to the sum of n natural numbers…

2 years ago

Program to Find ASCII Value of a Character

In C++ programming, a character variable stores an ASCII value (an integer number between 0 and 127) rather than the character…

2 years ago

Even Or Odd number check

A number is even if it is divisible by two, and odd if it is not divisible by two. Some…

2 years ago

Adding two numbers

Program code: #include<iostream> using namespace std; int main() { //variable declaration int x, y; //variable declaration and initialization int sum=0;…

2 years ago