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
VikaD [51]
3 years ago
13

A and B have same output or not? A B x=0 x=0 do do x<3 x=x+1 x=x+1 print x print x while x<3 while

Computers and Technology
1 answer:
katen-ka-za [31]3 years ago
6 0

Answer:

A and B have different output:

A output will be 1

B output will be 123

Explanation:

A

X = 0

do x < 3

x = x+1

print x

while

B

X = 0

do x = x+ 1

print x

while x < 3

For statement A the condition statement which suppose to be after "while" is not set therefore the value of x will be printed.

For statement B the condition statement is set "x < 3" in front of "while" thereby result in iteration until the condition is false.

Statement A output will be 1

Statement B output will be 123

You might be interested in
Hi guts gyt edgsahgflefljwegfwygafbhdshdnvcashD
lapo4ka [179]

Hello, how are you and welcome!

4 0
3 years ago
Write C++
crimeas [40]

Answer:

u can see the answer in this picture

5 0
2 years ago
Suppose for the worst case, given input size n: Algorithm 1 performs f(n) = n2 + n/2 steps Algorithm 2 performs f(n) = 12n + 500
melomori [17]

Answer:

29

Explanation:

for n=28:

--------------

Algorithm 1 performs f(n) = n2 + n/2 = 28*28 + 28/2 = 798

Algorithm 2 performs f(n) = 12*28 + 500 = 836

for n=29

--------------

Algorithm 1 performs f(n) = n2 + n/2 = 29*29 + 29/2 = 855.5

Algorithm 2 performs f(n) = 12*29 + 500 = 848

so, for n=29, algorithm 2 will be faster than algorithm 1

6 0
3 years ago
Why transportation RFP is important?​
liberstina [14]
Accurate and relevant information , a quick process
8 0
3 years ago
When a cells number format is “time” it will show a value in what format
Leokris [45]

The format of time shows a value of time day (what time it is).

When you choose the option of time you can have it displayed in a variety of formats, including military time and a time display that will change with regional time zones,

3 0
3 years ago
Other questions:
  • A Hierarchy Custom Setting stores a specific URL for each profile in Salesforce. Which statement can a developer use to retrieve
    5·1 answer
  • A digital media professional's computer is too full of video files. She would like to upgrade her computer to have more capacity
    12·2 answers
  • The IT department sent out a memo stating that it will start delivering desktop computer interfaces through the IT data center v
    5·1 answer
  • A technician removes the cap from the brake fluid reservoir and finds that the rubber boot in the cap is swollen. technician a s
    8·1 answer
  • What is the gauge manifold made of
    14·1 answer
  • What is the mode of 18, 18, 15, 18, 18, 24, 21, 21, 24, and 14?<br> 18<br> 18.5<br> 21<br> 22.3
    13·1 answer
  • Gray London is a retired race car driver who helped Dale Earnhardt, Jr. get his start. He is writing a book and making a video a
    9·1 answer
  • Hey, Another question. I'm sure it's possible in the future, but I wanted to ask if HIE would be possible. I'm sure it would be,
    12·1 answer
  • A short-range wireless network is called:
    10·1 answer
  • In windows 10, where would you save the template so it is available in the available templates list in backstage view?.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!