Sunday , January 22 2017
Home / Harshit Tandon (page 3)

Harshit Tandon

JAVA program to check Anagram of a Words

Program in Java to Check if the word is a anagram of a given word: An anagram is a type of word play, the result of rearranging the letters of a word to produce a new word or we can say the possible string we make by rearranging the letter of word. Example: Anagram of the word ‘ABC’ are : ABC, ...

Read More »

JAVA program to calculate digit sum of an integer

The digit sum of a given integer number is the sum of all its individual digits. Java Source code to calculate sum of digits of a number is given with example and detailed explanation. The sum of the digits of a number are calculated or used in many further programs. Digit Sum Example:- Iteration 1 : 1894%10 = 4 1894/10= 189 value ...

Read More »

C program to Calculate Sum of Digits of a Number

C Program to find Digit Sum:  The digit sum of a given integer number is the sum of all its digits. The source code given here are for two methods or rather tricks in C language. Digit Sum Example:-   Digit Sum of 12321 is calculated 1+2+3+2+1=9. Digit Sum of 34236789754 is calculated 3+4+2+3+6+7+8+9+7+5+4=58. We have also given the Solution of the ...

Read More »

Bouncing Ball Program in C Graphics

Here is the C Program for Bouncing ball animation in computer Graphics. Download the source code given here for the bouncing ball problem. The colored bouncing ball moves along x and y axis using a loop and decreasing and increasing the value of x and y in order to move the ball.

Read More »

Python program to calculate digit sum

Python program to calculate sum of the digits of a number here is a : This Source code for digit sum is calculated by getting the remainder and dividing each number by 10 in every iteration. The digit sum of a given integer number is the sum of all its individual digits. Example for digit sum:- Digit Sum Iteration 1 : 1894%10 ...

Read More »

Binary Search Program in Java

Binary search Program with Example:-  A binary search locates an item in a sorted array by repeatedly dividing the search interval in half. Initially interval include the whole array. If the value of the search key is less than the item in the middle of the interval, narrow the interval to the lower half. Otherwise narrow it to the upper ...

Read More »

Java Program to find Anagrams Words

Anagrams Program in Java: Anagrams means different combination, the result of rearranging the letters of a word to produce new words or we can say the possible string we make by rearranging the letter of word. Anagrams of a word is to get all the permutation of a word. Here we have provided a simple anagram code in Java and there are ...

Read More »

Harshad Number Program in Java (Niven Numbers)

Java Program to check for Harshad Number:  What is a Harshad Number? Harshad Number also called Niven Number is a number that is divisible by the sum of its digits. Example: Number 200 is a Harshad Number because sum of digits 2 and 0 and 0 is 2(2+0+0) and 200 is divisible by 2. Number 171 is a Harshad Number because ...

Read More »

Ugly Numbers Algorithm – C and Java Program

C Program / Algorithm for Ugly Numbers:  What is an Ugly Number Series? Ugly Numbers are the ones whose prime factors are 2,3 or 5 Only. We have also given a Java Source code in Method #4 So Ugly Number Series is 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, and so on… The reason why 1 is added is because ...

Read More »

C Program to make a Calculator – Source Code

C Calculator Program Source Code : C program with full illustration in comments is given here for making a Calculator in C. You can make this Calculator program to perform any operations you want but we have made this only for following operations: Addition (a+b) Subtraction (a-b) Multiplication (a*b) Division (a/b) Modulus (a%b) Factorial (a!) Power (a^b) Remember you can add ...

Read More »