You are on page 1of 2

ICT 9 Minitask 4.4- St.

Maximilian

Procedure:

1. The program has missing codes and syntax errors. Debug the code below to produce the
same layout of output but different interval. The program should accept your own name,
grade, section and your own class number. The letter pattern should be the first letter of
your Surname and the number pattern should start with your entered class number Each
pattern should contain 5 repetitions.
2. Use your Surname as object name.
3. Class name: MT4_4_Nested_Surname
4. Submit screenshots of (1) codes and (2) output in PDF format.
5. Filename of pdf file: MT4_4_Nested_Surname

Sample output:
Code with errors:

/**
* Program using nested loop
* @NAME (Dinglasan, Cristy R.)
* @grade and section (G9-St. Sebastian)
* @date (March 29, 2022)
*/
import java.util.Scanner;
public class ____________________ {
public static void main(String[] args) {
Scanner ________ = new Scanner(System.in);
System.out.println("Enter Name: ");
String fn = ____________________
System.out.print("Enter Grade and Section: ");
Rubric for MT 4.3
String gs = __________.nextLine();
System.out.print("Enter Class Number: ");
Design/Output – 10 pts
int cn = ___________________
Declaration/Logic – 10 pts
Scanner Input – 10 pts
System.out.println();
Loop – 10 pts
System.out.println("MT 4.4: Nested Loop \n");
Time – 10 pts
System.out.println("Class Number: " + Cn);
System.out.println();
TOTAL – 50 PTS
int a;
for( ______; a>=1; a=a-2) {
for(int j=1; j<=a; j=j-2) {
System.out._______________
}
System.out.println();
}
for (int i = cn; i >=1; ______) {
For (int j =cn; ______; j=j-3) {
System.out.print(j + " ");
}
}
System.out.println();
System.out.println("Full Name:" + fullname);
System.out.println("Grade and Section:" + gs);
}
}

You might also like