How many times is the println statement executed?

for (int i = 0; i < 10; i++)
for (int j = 0; j < i; j++)
System.out.println(i * j)

a. 100
b. 20
c. 10
d. 45


d

Computer Science & Information Technology

You might also like to view...

The command type pwd

a: displays pwd file b: shows if the pwd command is a program or a built in command c: prints the working directory d: displays the access code of the current directory e: none of the above

Computer Science & Information Technology

Write a method called switchThem that accepts two integer arrays as parameters and switches the contents of the arrays. Take into account that the arrays may be of different sizes.

What will be an ideal response?

Computer Science & Information Technology

Explain in detail what the web is, and include the terms webpage, website, and web server in your explanation.

What will be an ideal response?

Computer Science & Information Technology

Given the following program, which line(s) cause(s) output to be displayed on the screen?

``` 1 // This program displays my gross wages. 2 // I worked 40 hours and I make $20.00 per hour. 3 #include 4 using namespace std; 5 6 int main() 7 { 8 int hours; 9 double payRate, grossPay; 10 11 hours = 40; 12 payRate = 20.0; 13 grossPay = hours * payRate; 14 cout << "My gross pay is $" << grossPay << endl; 15 return 0; 16 } ``` a. lines 13 and 14 b. lines 8 and 9 c. line 14 d. lines 14 and 15 e. line 15

Computer Science & Information Technology