subject

Consider the following code segment:

int p = 5;
while(p > 0)
{
for(int j = p; j < p*2; j++)
{
System. out. print(" * ");
}
System. out. println();
p--;
}
What will the final result be when run in the console?

* * * * *
* * * *
* * *
* *
*

* * * * * *
* * * * *
* * * *
* * *
* *

*
* *
* * *
* * * *
* * * * *

* * * * * * * * * * * * * * * *
* * * * * * * * * * * * *
* * * * * * * * * *
* * * * * * *
* * * *

* *
* * *
* * * *
* * * * *

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 01:50, akornegay2
Write a program that uses a random number generator to generate a two digit positive integer and allows the user to perform one or more of the following operations: a. double the number. b. reverse the digits of the number. c. raise the number to the power of 2, 3, or 4. d. sum the digits of the number. e. if the number is a two-digit number, then raise the first digit to the power of the second digit. f. if the number is a three-digit number and the last digit is less than or equal to 4, then raise the first two digits to the power of the last digit. after performing an operation if the number is less than 10, add 10 to the number. also, after each operation determine if the number is prime. each successive operation should be performed on the number generated by the last operation. your program should not contain any global variables and each of these operations must be implemented by a separate function. also, your program should be menu driven. 7. (fraction calculator) write a program that
Answers: 1
image
Computers and Technology, 23.06.2019 05:20, reeeeeee32
What did creator markus “notch" persson initially call his game
Answers: 1
image
Computers and Technology, 24.06.2019 20:20, puppylover72
3. write assignment statements that perform the following operations with the variables a, b, and c: a. adds 2 to a and assigns the result to b b. multiplies b times 4 and assigns the result to a c. divides a by 3.14 and assigns the result to b
Answers: 2
image
Computers and Technology, 25.06.2019 01:00, mrstealyogirl40
Holly created a professional development plan to explore how she could advance from her entry-level position to the next step in her career. she has identified her current skills and the skills needed for the job she wants. what should she do now? a) ask a colleague for advice about work-life balance b) identify her areas for improvement c) plan a vacation before she begins her new job d) wait until a position opens before continuing her plan
Answers: 1
You know the right answer?
Consider the following code segment:

int p = 5;
while(p > 0)
{
for(...

Questions in other subjects:

Konu
Mathematics, 07.01.2021 08:30
Konu
Biology, 07.01.2021 08:30
Konu
Mathematics, 07.01.2021 08:30
Konu
Mathematics, 07.01.2021 08:30
Konu
Mathematics, 07.01.2021 08:30
Konu
Mathematics, 07.01.2021 08:30
Konu
Mathematics, 07.01.2021 08:30