python

Python program to print the multiplication table of a specific number

Python program to print the multiplication table of a number in two different ways. We will learn how to use a for loop and how to use a while loop to print the multiplication table.

Read
python

3 ways in Python to calculate GCD or HCF of two numbers

Python program to calculate GCD or HCF of two user input numbers. Learn how to do it by using a for loop, by reverse looping and by Euclid's division algorithm.

Read
C++

2 different C++ program to copy the content of one file to another

C++ program to copy the content of one file to another. We will learn 2 different ways to do it, by using fgetc, fputc and by using fstream in this post with examples.

Read
python

Python program to check if a number is a Niven or Harshad number

Python program to check if a number is a Niven or Harshad number or not. The program will take one number as input from the user and print if it is a Niven or Harshad number.

Read
java

3 ways in Java to print Hello World without semicolon

Java program to print hello world or any other string without semicolon. We will use if-else statement, for loop and StringBuilder append method to print the message without any semicolon in Java.

Read
java

Java program to find the power of a number using recursion

Java program to find the power of a number using recursion. This post will show you what is a recursive function and how to find the power of a number using recursion in Java.

Read
java

Java program to calculate compound interest

Java program to calculate compound interest with user-input values. Learn the formula to calculate compound interest and how to write it programmatically using Java.

Read
java

5 ways in Java to print the total number of days in a month

Java program to print the total number of days in a given month of a year. The program will take the month and year values as inputs from the user and print the number of days for that month in 5 different ways.

Read
C++

C++ program to print a diamond shape star pattern

C++ program to print a diamond shape pattern using star or any other character. It will use a for loop or while loop to print the pattern with user given height.

Read
python

Python example to print the function name as string with __name__ and __qualname__

Python program to get the function name as a string. We will learn how to use the __name__ and __qualname__ attributes to get the name of a function in this post with example.

Read