Java Interview qus.
Java Interview qus.
Output :
55555
4444
333
22
1
Write a program to find whether given no. is Armstrong or not.
Example :
Input - 153
Output - 1^3 + 5^3 + 3^3 = 153, so it is Armstrong no.
Write a program to find whether no. is palindrome or not.
Example :
Input - 12521 is a palindrome no.
Input - 12345 is not a palindrome no.
Write a program to generate Harmonic Series.
Example :
Input - 5
Output - 1 + 1/2 + 1/3 + 1/4 + 1/5 = 2.28 (Approximately)
Write a program to find average of consecutive N Odd no. and Even no.
Display Triangle as follow : BREAK DEMO.
1
23
456
7 8 9 10 ... N
Display Triangle as follow
0
10
101
0101