In this example we show how to generate a multiplication table in C++ Example We take input from the user and then use a for loop to display the table …
Programs
-
-
In this example we show how to concatenate 2 strings in C++ We will use the + operator to join 2 strings from the user Example #include <iostream> using …
-
In this example we will check if a number is positive or negative in C++ Example We use an if -else statement in this example after taking input from the …
-
In this example we show you how to copy one string to another in C++ Example #include <iostream> using namespace std; int main() { string myString1, myString2; cout << …
-
In this example, we will show you how to open and read the contents of a file, in C++. Example In this example we open a file called fileexample.txt The …
-
In this example we show how to tell if a number is a prime number or not in C++ Lets first talk about what a prime number is A prime …
-
In this article we show you how to check if a number is even or odd in C++ We use the modulus operation which returns the remainder obtained when number …
-
In this article we show a simple way to convert a decimal number to a binary number using JavaScript Example 1 The user is prompted to enter a number. The …
-
In this example we display all the prime numbers between 1 and 100. A prime number is a positive integer that is only divisible by 1 and itself Example // …
-
In this example we check if a year is a leap year Some examples use a formula to check if a year is a leap year, this example checks if …