
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 33676 Articles for Programming

745 Views
To memorise the few fundamental multiplication results in tabular or graphic form, use multiplication tables. This article will cover how to produce a multiplication table in C++ that looks like a right-angled triangle. In a select few situations where a larger number of results may be easily memorised, triangular representation is effective. In this format, a table is shown row by row and column by column, with each row containing only the entries that fill that column. To solve this problem, we need basic looping statements in C++. For displaying the numbers in triangular fashion, we need nested looping to ... Read More

2K+ Views
While writing a program in any language, taking input is a fundamental job that we do in almost all programs. Sometimes we take input directly from the console or take the inputs from the files. Taking inputs from the files is somewhat beneficial because it does not require us to type inputs again and again, or sometimes we can save some good input test cases into a file. However, in this article, we are going to focus on console-based inputs. We will learn different techniques to get inputs from the user in C++. There are a few different approaches to ... Read More

25K+ Views
Representing numbers in outputs is an interesting and also important task while we are writing programs in any language. For integer type (short, long, or medium) type data, it is easy to express the numbers as output. For floating point numbers (float or double type), sometimes we need to round them off to certain decimal places. For example, if we want to represent 52.24568 up to three decimal places, some pre-processing needs to be done. In this article, we shall cover a few techniques to represent a floating-point number up to a certain decimal placed by rounding it off. Among ... Read More

26K+ Views
After calculating interest on the principal amount, simple interest is calculated by taking the principal amount, the rate of interest, and the number of years it will take to calculate interest. The formula is quite easy to understand. The power law is used to calculate compound interest by taking into account the principal amount, the rate of interest, and the period. Here, the formula is likewise not difficult. In this article, we'll talk about how to calculate simple and compound interest values and then use the C++ programming language to put this logic into practice. Simple Interest Simple interest is ... Read More

295 Views
In this article, we will understand how to find the area of a parallelogram. The area of a parallelogram is calculated using the formula by − base * height Below is a demonstration of the same − Suppose our input is − Base: 6 Height: 8 The desired output would be − Area of parallelogram is: 48 Algorithm Step 1 − START. Step 2 − Declare three values namely base, height and myResult. Step 3 − Define the values. Step 4 − Calculate the area using the formula by base * height and store the result. Step ... Read More

493 Views
In this article, we will understand how to find the perimeter of a circle. The perimeter of a circle is calculated using the formula. (2*22*radius)/7 You can also write the above as − 2ℼr The value of ℼ is 22/7 or 3.14. Suppose our input is − Radius of the circle : 5 The desired output would be − Perimeter of Circle is: 31.428571428571427 Algorithm Step 1 − START. Step 2 − Declare 2 double values namely radius and myResult. Step 3 − Define the values. Step 4 − Calculate the perimeter using the formula ... Read More

245 Views
In this article, we will understand how to find the area of a trapezium. The area of a trapezium is calculated using the formula. (height/2 * (side1 + side2)) Below is a demonstration of the same − Suppose our input is − side1 = 5 side2 = 6 height = 6 The desired output would be − Area of trapezium is: 33.0 Algorithm Step 1 − START. Step 2 − Declare four integer values namely side1, side2, height and myResult. Step 3 − Define the values. Step 4 − Calculate the area of the trapezium using ... Read More

760 Views
In this article, we will understand how to find the Area of a Square. The area of a square is calculated using the formula. side*side Below is a demonstration of the same − Suppose our input is − Length of the side : 4 The desired output would be − Area of the square : 16 Algorithm Step 1 − START. Step 2 − Declare 2 integer values namely sideValue and myResult. Step 3 − Define the values. Step 4 − Calculate the area of the square using the formula side*side and store the result. Step ... Read More

638 Views
In this article, we will understand how to calculate the power of a number. The calculate the power of a number is calculated using a loop and multiplying it by itself multiple times. Below is a demonstration of the same − Suppose our input is − Number : 4 Exponent value : 5 The desired output would be − The result is 1024 Algorithm Step 1 − START Step 2 − Declare three integer values namely baseValue, exponentValue and and myResult Step 3 − Define the values Step 4 − Using a while loop, multiply the input ... Read More

2K+ Views
In this article, we will understand how to print an integer in Kotlin. The reverse of a number is computed using a loop and arithmetic operator % and /. Below is a demonstration of the same − Suppose our input is − The number : 123456 The desired output would be − The result is 654321 Algorithm Step 1 − START Step 2 − Declare two integer values namely myInput and reversed. Step 3 − Define the values Step 4 − Run a while loop Step 5 − Use modulus of 10 and get remainder for ‘myTemp’ ... Read More