Posts

Showing posts from June, 2020

Abundant Number in JAVA || BluejCode

Image
Abundant Number in JAVA Abundant Number : A number ‘n’ is said to be Abundant Number if sum of all the proper divisors of the number is greater than the number ‘n’ . The difference between Sum & Number is called the abundance . The abundant number can be called as an excessive number

Pattern Program #4 || Number Pattern in JAVA || BluejCode

Image
Pattern Program #4 Pattern 1 Pattern 2 Pattern 3

String Pattern #1 in JAVA || BluejCode

Image
String Pattern Program #1 String Pattern

Pattern Program #3 || Pattern Program in JAVA || BluejCode

Image
Pattern Program #3 Pattern

Count Words in a String in JAVA

Count No. of Words in a String To Count number of words in a string we have to count no of white spaces in the given string. No. of words = No. of White Spaces + 1. Example :- Welcome to BluejCode! Here : No. of white spaces are 2, So words are (No. of white spaces + 1) = 3 words

Pronic Number in JAVA

Pronic Number Pronic Number : A number is said to be Pronic number if the product of any two consecutive integer is equal to the number itself. Example: Input          : 6  : 2 X 3 = 6 Output       : It is a Pronic Number   Input          : 20  : 4 X 5 = 20 Output       : It is a Pronic Number   Input          : 8  : 2 X 4 = 8 Output      : It is not a Pronic Number   Some Pronic Numbers are :- 0, 2, 6, 12, 20, 30, 42, 56, 72, 90 etc. Algorithm and Program given below :-