Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Syed M Ubaid 403-EE-2010

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:-

5. Find the Sin, Cosine and Tangent of 60.

 Input:-
 Output:-

6. Write a program to generate the following output.


A
C E
G I K
M OQ S

Assignment # 1
Syed M Ubaid 403-EE-2010

 Input:-
 Output:-

7. Write a program to check whether character is vowel or constant.

 Input:-
 Output:-

8. Write a program such that it generates values randomly and whenever it


generates a two digit integer divisible by 5 it ends.

Input:-
Output:-

Assignment # 1

You might also like