Professional Documents
Culture Documents
Assignment Program 1 Java
Assignment Program 1 Java
Assignment # 1
1. Define two variables of type long, add subtract multiply and divide them and
display the result on screen.
Input:-
Output:-
2. Define two double type variables with floating values. Divide them and store
them in an integer type variable.
Input:-
Output:-
3. Write a program that generates ten random number between 30 and 60 and
then calculate their average.
Input:-
Output:-
Assignment # 1
Syed M Ubaid 403-EE-2010
4. Take two variables of type integer and assign them values. Find out the
maximum and minimum of the two by using two method of Math class.
Input:-
Output:-
Input:-
Output:-
Assignment # 1
Syed M Ubaid 403-EE-2010
Input:-
Output:-
Input:-
Output:-
Input:-
Output:-
Assignment # 1