You are on page 1of 2

Program-1

write a java program to read a positive number N(N>0) print the no of divisors of
number N which are perfect squares.

input
36
output
4

for the number 36 the divisors are


1 2 3 4 6 9 12 18 36
among the above divisors only 1,4,9,36 are perfect squares so the output is 4

input
60
output
2

for the number 60 the divisors are


1 2 3 4 5 6 10 12 15 20 30
among the above divisors only 1,4 are perfect squares so the output is 2

But every number will have atleast '1' as divisors which is a perfect square
so the output will be 1

Assume the Number 'N" is a Postive Integer

back end test cases


case = 1
input = 36
output = 4

case = 2
input = 60
output = 2

case = 3
input = 10
output = 1

case = 4
input = 5
output = 1

Program-2
Write a program to check if a given number is COMPLETE NUMBER or NOT

A Number is said to be COMPLETE NUMBER if the individual digits of the number are
all even
if the individual digits of the number are not even then print NOT COMPLETE NUMBER

Assume 0 as a Even Number

input = 46
output = COMPLETE NUMBER
input = 135
output = NOT COMPLETE NUMBER

input = 100
output = NOT COMPLETE NUMBER

input = 208
output = COMPLETE NUMBER

back end test cases


case = 1
input = 46
output = COMPLETE NUMBER

case = 2
input = 135
output = NOT COMPLETE NUMBER

case = 3
input = 100
output = NOT COMPLETE NUMBER

case = 4
input = 208
output = COMPLETE NUMBER

You might also like