1) Show the calculation complexity of cizfunction as O.
static void ciz(int m) {
for(int i=1; i<=m; i++)
System.out.print(“X”);
}
2) By using the answer to 1, Show thecalculation complexity of main function as O.
import java.util.Scanner;
…
public static void main(String[] arg) {
int n;
Scanner oku = new Scanner(System.in);
System.out.print(“N=”);
n=oku.nextInt();
for(int m=1; m<=n; m++) {
ciz(m);
System.out.println();
}
}
Expert Answer
An answer will be send to you shortly. . . . .