C++ Program

Convert Decimal to Binary

Given a decimal number as input, we need to write a program to convert the given decimal number into an…

2 years ago

Program To Find the grade of the student

Find the grade of the student based on the marks obtained in five subjects. Let the grade be calculated based…

2 years ago

Swap Two Numbers Without Using Third Variable

By using the + and - operators, we can swap two numbers without using a third variable. Main logic: //Logic…

2 years ago

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

Diamond Pattern Using Numbers

Program code: #include<iostream> using namespace std; void display(int n) { int space = n / 2, num= 1; for (int…

2 years ago

Floyd’s Triangle

Floyd’s triangle is a triangular array of natural numbers and it is named after Robert Floyd, a renowned computer scientist popularly…

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

Christmas Tree Pattern

C++ programming using "*" for Christmas Tree Pattern Program code: #include<iostream> using namespace std; int main() { int width, height,…

2 years ago

Numeric 1-121-12321 Pyramid Pattern

In this program, we use numbers to generate a pyramid-like pattern. And numbers follow a pattern similar to this: 1…

2 years ago