H.C.F. or G.C.D. Of Two Number Program in Java

java program to calculate HCF of two number

In this tutorial, we are going to learn writing java program to calculate the Highest Common Factor of two numbers. Our program will take two numbers as the inputs given by the user and returns the h.c.f. of given numbers. For example, for the inputs of the two numbers 4 and 6. Our program will … Read more

Python Program to find top two maximum number in array

python program top two maximum in array

In this tutorial, you will learn how to write Python program to find the first top two largest/maximum element in python. To find two maximum number in python, first we will sort our array in ascending order (you can also implement it by sorting in descending order). Now select last two distinct element which will … Read more

Python program to find all non repeating characters in the string

Python program to find all non repeating characters in the string

In this tutorial, we will learn writing the python program to print all characters of the string which are not repeating. We can say the character are available only one time in string. Problem Statement Take any string as an input from the user and check if any character in the string is repeating or … Read more

Replace string space with given character in Python

Explanation: As we can observe the string returned is without any space and all spaces from the input string are replaced with character ‘t’.

In this tutorial we are going to learn writing python program to replace the string space with given character. Problem Statement For a given string we have to replace all the spaces with the character given by the user as an input. For example: Our logic to replace a string with given character In order … Read more

Python program to check given character is vowel or consonant

Python program to check given character is vowel or consonant

In this tutorial we are going to learn writing python program to check given character is a vowel ( a, e, i, o, u) or any other alphabet other than vowels(consonant) . Problem statement For any input character, we have to check whether a character is a vowel or consonant. For example: Our logic to … Read more

Python program to find sum of integers present in the string

Python program to find sum of integers in the string

In this tutorial, we will learn writing the python program to find the sum of integers which is present in the given strings. First we will iterate and check the available character is string or not? if digit the perform addition. Problem Statement Take any string as an input from the user. Now check for … Read more