Monthly Archives: January 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

PrimePalinGen

Design a class PrimePalinGen to generate prime palindrome numbers. Continue reading

Posted in number | Leave a comment

MERGER

A class Merger concatenates two positive integers that are greater than 0 and produces a new merged integer. Continue reading

Posted in number | Leave a comment

HAPPY NUMBER

A happy number is a number in which the eventual sum of the square of the digits of the number is equal to 1. Continue reading

Posted in model2020 | Leave a comment

MATRIX SYMMETRIC

Write a program to declare a square matrix A[][] of order MxM where ‘M’ is the number of rows and the number of columns, such that M must be greater than 2 and less than 10. Continue reading

Posted in model2020 | Leave a comment