Karthikeya Boyini has Published 2383 Articles

C++ Program to Display Prime Numbers Between Two Intervals Using Functions

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 08:07:54

2K+ Views

A prime number is a whole number that is greater than one and the only factors of a prime number should be one and itself. Some of the first prime numbers are 2, 3, 5, 7, 11, 13 ,17 etc.There can be many prime numbers between two intervals. For example, ... Read More

C++ Program to Calculate Power Using Recursion

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 08:06:18

4K+ Views

The power of a number can be calculated as x^y where x is the number and y is its power.For example.Let’s say, x = 2 and y = 10 x^y =1024 Here, x^y is 2^10A program to find the power using recursion is as follows.Example Live Demo#include using namespace std; ... Read More

C++ Program to Add Two Matrix Using Multi-dimensional Arrays

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 08:03:12

2K+ Views

A matrix is a rectangular array of numbers that is arranged in the form of rows and columns.An example of a matrix is as follows.A 4*3 matrix has 4 rows and 3 columns as shown below −3 5 1 7 1 9 3 9 4 1 6 7A program that ... Read More

C++ Program to Find ASCII Value of a Character

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 07:58:54

9K+ Views

There are 128 characters in the ASCII (American Standard Code for Information Interchange) table with values ranging from 0 to 127.Some of the ASCII values of different characters are as follows −CharacterASCII ValueA65a97Z90z122$36&38?63A program that finds the ASCII value of a character is given as follows −Example Live Demo#include using ... Read More

C++ Program to Check Whether a Number is Palindrome or Not

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 07:57:21

2K+ Views

A palindrome number remains the same if its digits are reversed i.e its value does not change. A palindrome number can also be called symmetric. For example: The numbers 12321, 1551, 11 etc are palindromes as they do not change even if their digits are reversed.A program that checks if ... Read More

C++ Program to Make a Simple Calculator to Add, Subtract, Multiply or Divide Using switch...case

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 07:55:33

1K+ Views

Let us see a program to create a simple calculator in C++, with Add, Subtract, Multiply and Divide operations.Example Live Demo#include using namespace std; void calculator(int a, int b, char op) {    switch (op) {       case '+': {          cout

C++ Program to Find G.C.D Using Recursion

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 07:51:29

8K+ Views

The Greatest Common Divisor (GCD) of two numbers is the largest number that divides both of them.For example: Let’s say we have following two numbers: 45 and 2763 = 7 * 3 * 3 42 = 7 * 3 * 2 So, the GCD of 63 and 42 is 21A ... Read More

C++ Program to Find All Roots of a Quadratic Equation

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 07:47:19

7K+ Views

A quadratic equation is in the form ax2 + bx + c. The roots of the quadratic equation are given by the following formula −There are three cases −b2 < 4*a*c - The roots are not real i.e. they are complexb2 = 4*a*c - The roots are real and both ... Read More

C++ Program to Check Leap Year

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 07:35:08

12K+ Views

A leap year contains one additional day that is added to keep the calendar year synchronized with the astronomical year.A year that is divisible by 4 is known as a leap year. However, years divisible by 100 are not leap years while those divisible by 400 are.The program that checks ... Read More

C++ Program to Generate Multiplication Table

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 07:32:07

4K+ Views

The multiplication table is used to define a multiplication operation for any number. It is normally used to lay the foundation of elementary arithmetic operations with base ten numbers.The multiplication table of any number is written till 10. In each row, the product of the number with 1 to 10 ... Read More

Advertisements