1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ganezh [65]
3 years ago
9

What output is produced by the following program?

Computers and Technology
1 answer:
k0ka [10]3 years ago
7 0

Answer:

The correct output of the following question as follows:

1 2 3 4 5

1 2 3 4 5 6 7

1 2 3 4

number=8

Explanation:

In the program, there is the main class name Weird. In that class, there is a main method and one function name (halfTheFun). In this function, we pass one parameter and call the function 3 times.

In first time calling, we pass the value 11. It is divided by 2 the answer 5 because (/) takes Quotient. Then use the for loop it is an entry control loop. It starts from 1 and equal to the number and print the value one by one.

In Second time calling, we pass the value(2 - 3 + 2 * 8) that is 15. It is divided by 2 the answer 7 because (/) takes Quotient. Then we use for loop. It starts from 1 and equal to the number and print the value one by one.

In the third time calling, we pass the value 8. It is divided by 2 the answer 4 because (/) takes Quotient. Then we use for loop. It starts from 1 and equal to the number and print the value one by one.

and we print the number.

OUTPUT:

1 2 3 4 5

1 2 3 4 5 6 7

1 2 3 4

number=8

You might be interested in
What is the difference between (IF instructions &amp; WHILE instructions )<br> 0<br> 를 들<br> T<br> !
lara31 [8.8K]

Answer:

While statements determine whether a statement is true or false. If what’s stated is true, then the program runs the statement and returns to the first step. If what’s stated is false, the program exits the while and goes to the next statement. An added step to while statements is turning them into continuous loops. If you don’t change the value so that the condition is never false, the while statement becomes an infinite loop.

If statements are the simplest form of conditional statements, statements that allow us to check conditions and change behavior/output accordingly. The part of the statement following the if is called the condition. If the condition is true, the instruction in the statement runs. If the condition is not true, it does not. The if statements are also compound statements. They have a header (if x) followed by an indented statement (an instruction to be followed is x is true). There is no limit to the number of these indented statements, but there must be at least one.

7 0
3 years ago
Advantages of monolithic operating system? ​
Lyrx [107]

Advntage:

provides CPU scheduling, memory management, file management, and other operating system functions through system calls. The other one is that it is a single large process running entirely in a single address space.

Disadvantage: if anyone service fails it leads to an entire system failure

8 0
2 years ago
Write a program using integers userNum and x as input, and output userNum divided by x four times. Ex: If the input is: 2000 2
STatiana [176]

Answer:

// here is code in c++.

// include header

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// variables to read input

   int userNum,x;

   cout<<"enter the value of userNum and x :";

   // read the input from user

   cin>>userNum>>x;

   // divide the userNum with x 4 times

   for(int a=0;a<4;a++)

   {

       userNum=userNum/x;

       cout<<userNum<<" ";

   }

       cout<<endl;

return 0;

}

Explanation:

Declare two variables "userNum" and "x". Read the value of these. Run a for loop 4 time and divide the "userNum" with "x" and print  the value of "userNum".

<u>Output:</u>

enter the value of userNum and x :2000 2                                                                                  

1000 500 250 125  

3 0
3 years ago
PLEASE HELP!!! Me turn this into a video &amp; add liana flores- raise the moon (instrumental) in the background for the music.
Marina CMI [18]

Answer:

Try going to your settings and allow output camera

Explanation:

5 0
2 years ago
Read 2 more answers
Exercise 3.16.4: Happy Face Solita
enot [183]

first do a happy face and a circule thats it

7 0
3 years ago
Other questions:
  • Make the correct match.
    11·1 answer
  • Write a program that takes as input an arithmetic expression followed by a semicolon ";". The program outputs whether the expres
    11·1 answer
  • Select the correct answer.
    15·1 answer
  • 1. The future of 2D animation does not include hand-drawing. (1 point)
    13·1 answer
  • If a function needs to return more than one value, as a rule of good programming style, you should change it to a(n) ___________
    6·1 answer
  • What does it mean to read visual and audio text
    7·1 answer
  • Create a story that depicts the events leading up to a vehicle crash fatality, the crash itself, and the emotional aftermath on
    9·1 answer
  • Minerals can form deep inside Earth’s crust by
    13·1 answer
  • In a typical e-mail address, the "host" is user: which one of the following word processing features saves you the most time whe
    8·1 answer
  • A use case description is the best place to start for the design of the forms for a user interface.​ True False
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!