# C++ Programs 17 Lessons

## C++ Program to Print String

This C++ program is used to demonstrates printing given string on the screen input by the user.

## C++ Program to Find ASCII Value of a Character

This C++ program is used to find and print the ASCII value of a letters, numbers, and other characters.

## C++ Functions with No Arguments and No return value

This C++ program is used to demonstrates how to use a function without any parameters and return type.

## C++ Program to Creating a Pyramid

This C++ program is used to demonstrates how to create a triangular pattern.

## C++ Program to Demonstrate Use of Ternary Operator

This C++ program is used to demonstrates the use of ternary operator.

## C++ Program to Check Whether Given String is a Palindrome

This C++ program is used to demonstrate whether the given string is a palindrome or not.

## C++ Program to Print Integer

This C++ program is used to print given integer input by the user on the screen. cin is used to obtain input and cout is used to print the number on the screen.

## C++ Program to Perform Addition, Subtraction, Multiplication and Division

C++ program to perform basic arithmetic operations of two numbers. Numbers are assumed to be integers and will be entered by the user.

## C++ Program to Check Whether the Given Number is a Prime

A prime number is a natural number that has only one and itself as factors. This C++ program used to demonstrates how to find out whether a natural number is prime or not.

## C++ Program to Swapping Two Numbers Using a Temporary Variable

This C++ program is used to demonstrates swapping two numbers by using a temporary variable.

## C++ Program to Find Factorial

This C++ program is used to demonstrates calculate the factorial of any given number input by the user.

## C++ Program to Check Whether the Given Number is Even or Odd

even numbers are perfectly divisible by 2. In this example program, if else statement is used to check whether a number entered by the user is even or odd.

## C++ Program to Find Perfect Number

This C++ program is used to find the perfect number of a positive number and find its all positive divisors excluding that number.

## C++ Program to Find Prime Number

This C++ program is used to generate all the prime numbers from 1 till the number given by the user.

## C++ Compute the Sum and Average of Two Numbers

In this C++ program, you will get to know about how within a program, you take two integer variables and find the sum and average of these two integer variables and display the output.

## C++ Program to Create Floyd's Triangle

This C++ program is used to demonstrates print the right angled Floyd's triangle. 