Java Assignment
Java Assignment
6. Write a program which print the fibonacci series up to n and calculate sum of
all term.
7. Write a program scan two matrx for 3X3 and print the multiplication.
8. Write a program scan value and stored as ASCII format inside the string.
for example input 65 stored A
9. Write a do-while loop that asks the user to enter two numbers. The numbers
should be added and the sum displayed. The loop should ask the user whether he
or she wishes to perform the operation again. If so, the loop should repeat;
otherwise it should terminate.
10.Write a program to enter the numbers till the user wants and at the end it
should display the count of positive, negative and zeros entered.
11. Write a program to print out all Armstrong numbers between 1 and 500. If sum of
cubes of each digit of the number is equal to the number itself, then the
number is called an Armstrong number.
For example, 153 = ( 1 * 1 * 1 ) + ( 5 * 5 * 5 ) + ( 3 * 3 * 3 )
12.Write a program that will print a box of #�s taking from user the height and
width values.
Program Starts:
Enter height:
3
Enter width:
5
Output
###
###
###
###
###
13.You have to design the code such that the user has only three tries to guess the
correct pin of the account. You set the pin as a constant with a final
attribute. When correct display �Correct, welcome back.� When incorrect display
�Incorrect, try again.�. When ran out of tries display �Sorry but you have been
locked out.�
14.Write a program scan string and convert alternate character as upper case.
* * * *
* * *
* *
*
* *
* * *
* * * *
4 4 4 4
4 4 4
4 4
4
4 4
4 4 4
4 4 4 4