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
iVinArrow [24]
2 years ago
11

Write a program that uses a while loop to calculate and print the multiples of 3 from 3 to 21. Your program should print each nu

mber on a separate line. Expected Output:
3
6
9
12
15
18
21
Computers and Technology
1 answer:
nexus9112 [7]2 years ago
6 0

Code:

num = 3

while num <= 21:

   print(num)

   num+=3

Output of code:

3

6

9

12

15

18

21

Explanation:

The condition num <= 21 will ensure that the program will only print multiples of 3 up to 21. We set num as 3 since we want to start printing from 3, and we add 3 each time to get the multiples.

Hope this helps :)

You might be interested in
What does amelia heart and the wright brothers have in common
expeople1 [14]

Answer:

they are stepbro and step sis and they fucx

Explanation:

7 0
2 years ago
What are Loop Errors? Describe briefly. What aresymptoms of Loop Errors?
victus00 [196]

Answer:

The errors in the loop condition such that it is not giving desired results or it is not running accordingly.There are different types of loop errors which are as following:-

1.Infinite loop:-When the is not able to stop then the error is called infinite loop. for ex:-

int i=1;

while(i!=0)

{

cout<<"I am King"<<endl;

i++;

}

2.Off by one error:-This error mostly happens in loop for arrays as indexing of the array is from 0 to size-1 .So looping over the array up to the size is a off by one error.

3.Equality v/s assignment operator error:-In this error the condition in the loop is like this d=f which is wrong since = is assignment operator it assigns the value of f to d while d==f checks that the value of d and f are equal or not.

4.&& v/s || loop error:- In this error we use and operator (&&) instead of or operator (||) and vice versa.

symptoms of loop errors are not the desired output.

4 0
3 years ago
The process of _____ determines what volume a system can handle by comparing its performance to standards in the industry.
Artyom0805 [142]

Answer:

benchmarking

Explanation:

7 0
3 years ago
Whatis Level of node ‘46’?
Ierofanga [76]

Answer:

6

Explanation:

The  tree is the hierarchical structure in the data structure, it has the properties like nodes, height, level etc.

the formula for calculating the maximum number of node at the given level.

number of nodes = 2^{l-1}

here, l is the level of node.

in the question the number of node is 46.

Substitute in the formula:

2^{l-1}=46\\ l-1=log_{2}46\\ l=5.5235+1\\l=6.6235

The Approx. value of level is 6

5 0
3 years ago
It is not a good idea in a cover letter to mention another person whom the employer knows.
wel
You can mention them if it is OK that they notified you of the position and you feel confident that they have a good reputation within the company. And I would mention it only briefly by saying something along the lines of I have the pleasure of knowing Mr. Jones, who informed me there is an open position within your organization. He speaks very highly of your company and I would be interested in seeing if there’s an opportunity for me.
3 0
3 years ago
Other questions:
  • Using the merge method of the Map interface, which statement correctly updates the salesTotalByDept map of type Map to update th
    7·1 answer
  • Which type of software-generated problems can indicate that a software bug is causing a memory error?
    11·1 answer
  • Expressing your needs to others is aggressive behavior.<br> True or False?
    5·2 answers
  • Brainly won't let me create an account even though i tried multiple emails and ages! It keeps saying "We're sorry, but we are no
    8·2 answers
  • What is a sound wave
    7·2 answers
  • What HTML tag would you use to indicate a line break?
    5·1 answer
  • Which quality allows programmers to modify a program as and when required
    11·2 answers
  • 2:3:5<br>_ _ _<br>3 2 8<br><br><br><br>find ratio​
    5·1 answer
  • Given that n refers to a positive int use a while loop to compute the sum of the cubes of the first n counting numbers, and asso
    12·1 answer
  • What is an example of a device that commonly use Linux today
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!