Daily Archives: January 31, 2020

CharConvert

Write a program that reads a string and a character. Each occurrence of the given character (regardless of its case) is converted to opposite case. Continue reading

Posted in String | Leave a comment

ConsChange

shifts all the consonants of the word at the beginning followed by the vowels (e.g. spoon becomes spnoo and SPNoo Continue reading

Posted in String | Leave a comment

TheString

A class TheString accepts a string of a maximum of 100 characters with only one blank space between the words. Some of the members of the class Continue reading

Posted in String | Leave a comment

WORD PILE

WordPile is an entity which can hold maximum of 20 characters. The restriction is that a character can be added or removed from one end only. Continue reading

Posted in Array | Leave a comment

SMITH MUMBER

A smith number is a composite number, the sum of whose digits is the sum of the digits of its prime factors obtained as a result of prime factorization (excluding 1). Continue reading

Posted in number | Leave a comment

MAGICAL NUMBER

A number is said to be magical, if when we add its digits and repeatedly add the digits of the resulting sum and finally obtain 1. Continue reading

Posted in number | Leave a comment