In this example we show how to check if a number is positive, negative or zero in Java Example We take user input then use an if – else statement …
programmerdude
-
-
In this article we look at how to check if a number is odd or even in Java Example In the program, we first create a Scanner object, and then …
-
In this example we show you how to display the factorial of a number in C++ The factorial of a non negative number is the product of all the integers …
-
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 …
-
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 …