For Loop

C++ → Basics → Input → Arithmetic → Conditions → Loops → for loop The for loop in C++. Construction and Examples. The for loop is used when we have to run a program for a certain number of times. Construction: The for loop for (initial point; ending point; increment) { Statement(s) } Q 1. […]

Switch Statement

C++ → Basics → Input in C++ → Conditions → switch statement The switch statement in C++. Construction and Example. The switch statement is used when we have large data of the same variable type. Construction: The switch statement switch (variable) { case 1: statement break; case 2: statement break; case 3: statement break; default: […]

if-else conditions in C++

C++ → Basics → Arithmetical Operations → Input in C++ → Conditions and Decisions → if/else conditions The if / else conditions are used to make some very basic decisions. Learn the construction of conditional statements in C Plus Plus step by step. Construction: The if statement if(condition) { statement } For example, #include <iostream> using namespace std; […]

Input in C++

C++ → Basics → Arithmetical Operations → Input in C++ How C++ take values from the user? Input using ‘cin’ #include <iostream> using namespace std; int main() { int number; cout << “Please insert a number:” << endl; cin >> number; cout << “You insert the number: ” << number << endl; return 0; } […]

C++ Arithmetical Operations

C++ → Install Compiler → C++ Basics → Arithmetical Operations C++ Arithmetic. How to add, subtract, multiply and divide numbers in C Plus Plus. Adding two numbers #include <iostream> using namespace std; int main() { int a = 8; int b = 4; int c = a + b; cout << c << endl; return 0; […]

C++ Compiler

C++ → Install C++ Compiler The first step towards learning C++ programming is to download and install C++ Compiler. The compiler is needed to build a C Plus Plus program and run it! How to install a C++ compiler? Open www.codeblocks.org Click on Downloads on top of the page Click on Download the binary release […]

C++ Basics

C++ → Install Compiler → C++ Basics Welcome to the C++ Basics. Write your first C++ program and run it through C++ Compiler. Write your first C++ program #include <iostream> using namespace std; int main() { cout << “I have been studying C++ for 4 weeks!” << endl; return 0; } In our first C++ […]

Simple Interest

Financial Mathematics → Interest → Simple Interest After the accumulation of Interest, the final amount (A) is the sum of original amount plus the interest earned. A = Cash + Interest Earned That is So, we have the Simple Interest Formula Example 1. Suppose $1,000 is deposited in a bank that earns 5% simple interest. […]

Interest

Financial Mathematics → Interest Calculations The most common investments is the investment of money at interest. When money is deposited in a bank, the bank pays interest as a reward for the use of an asset called “capital”. Interest Formula Interest is calculated by the formula: Where, I = Interest earned C = Cash amount […]

Variance and Standard Deviation

Statistics → Mean → Expected Value → Weighted Average → Variance and Standard Deviation Consider the two data sets: Data Set 1: 4, 3, 5, 7, 6 Data Set 2: 2, 10, 1, 9, 3 The mean (or average) of the two data sets is same, that is 5. But in data set 2, the […]