• Tidak ada hasil yang ditemukan

B.Sc. (H) Computer Science, Semester II Lab Exercises BHCS03 – Programming in JAVA

N/A
N/A
Protected

Academic year: 2024

Membagikan "B.Sc. (H) Computer Science, Semester II Lab Exercises BHCS03 – Programming in JAVA"

Copied!
1
0
0

Teks penuh

(1)

B.Sc. (H) Computer Science, Semester II Lab Exercises

BHCS03 – Programming in JAVA

Attempt the following questions as part of JAVA Lab class today:

1. Write a program that prompts the user to read two integers and displays their product. Your program should prompt the user to read the number again if the input is incorrect. (Use Exception handling)

2. Write a program that meets the following requirements:

a. Creates an array with 120 randomly chosen integers b. Prompts the user to enter the index of the array, then

displays the corresponding element value. If the specified index is out of bounds, display the message OUT OF

BOUNDS

PS: You may send the solutions and/or doubts to

[email protected]. The file that you send should be saved with your roll number-subject name-today’s date.

Referensi

Dokumen terkait