Skip to content

Tag Archives: C++ Basic Programs

C++ Basic Programs

Given a positive integer N. The task is to write a C++ program to check if the number is prime or not.  Definition:  A prime number… Read More
char in c is a keyword used for representing character data type. The memory size of char is 1 byte containing numbers, alphabets, and alphanumeric… Read More
A cube is a 3-dimensional box-like figure represented in the 3-dimensional plane. Cube has 6 squared-shape equal faces. Each face meets another face at 90… Read More
Given two positive integers i.e, the length and breadth of the rectangle, the task is to find the length of the Diagonal of a Rectangle.… Read More
Here, we will see how to input a name and print it as the output using a C++ program. Below are the examples: Input: GeeksforGeeksOutput:… Read More
Here, we will see how to print Armstrong numbers between 1 to 1000 using a C++ program.  Armstrong Number A number “N” is an Armstrong… Read More
Given a number N, the task is to print the prime numbers from 1 to N. Examples:  Input: N = 10 Output: 2, 3, 5,… Read More
Given a number, check whether it is even or odd. Examples:  Input: 2 Output: even Input: 5 Output: odd Recommended Practice – Odd Even Problem… Read More
Given four types of variables, namely int, char, float and double, the task is to write a program in C++ to find the size of… Read More

Start Your Coding Journey Now!