

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A java programming quiz with five questions. The quiz covers various topics such as for loops, while loops, do-while loops, and printing odd numbers using loops. Students are required to write the code to produce the desired output for each question.
Typology: Quizzes
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Name: Panther ID: Please use 15 minutes to finish this quiz.
Bonus [5 pts] Observe that the pattern below has 5 rows where each row i, has i columns containing values 1, 2, … i. Write a program that will print the following pattern: 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 Write a program that will print the above pattern using nested loops. for (int i = 1; i <= 5; i++) { for(int j = 1; j <= i; j++) System.out.print(j + “\t”); System.out.println(“”); }