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
Oxana [17]
3 years ago
6

Write a program that prints the number 1 through 10 using a while loop

Computers and Technology
1 answer:
vova2212 [387]3 years ago
7 0
Which programming language are you working in?

Here is how you could achieve this in Python:

establish a counter, starting at 1.
While your counter is 10 or less, do two things:
print the counter,
and increase the counter by 1.

code:
counter = 1

while counter <= 10:
print(counter)
counter = counter + 1

Those last two lines should be indented.
You might be interested in
How to remove negative feedback on amazon?
Svetlanka [38]
1. go back to the feedback you submitted
2.Locate the order, and then click remove 
3.select a reason for the removal and click to remove the feedback button.

(But why would you write a rude comment in the first place to begin with?)
3 0
3 years ago
Assume values 10, 20, 30, and 40 are entered in the cell range A1:A4. Cell A10 contains the formula: =A1+A2+A3+A4 and displays v
r-ruslan [8.4K]

Answer:

The formula and value to this question is "=A1+A3+A4+A5 with value 100"

Explanation:

The explanation of the given question as follows:

  • In question, it is defined that four cells that are "A1, A2, A3, and A4"  contains value that are "10, 20, 30, and 40".
  • To add these values we use addition formula that is "=A1+A2+A3+A4". it will give value 100.
  • If the user inserts a new row that is "A2" and assigns a value in the cell that is "50" so, we use the above formula that adds values with these values we also use the value "100".
8 0
2 years ago
Assume the following variable definition appears in a program:
AnnZ [28]

Answer:

cout << setprecision(2)<< fixed << number;

Explanation:

The above statement returns 12.35 as output

Though, the statement can be split to multiple statements; but the question requires the use of a cout statement.

The statement starts by setting precision to 2 using setprecision(2)

This is immediately followed by the fixed manipulator;

The essence of the fixed manipulator is to ensure that the number returns 2 digits after the decimal point;

Using only setprecision(2) in the cout statement will on return the 2 digits (12) before the decimal point.

The fixed manipulator is then followed by the variable to be printed.

See code snippet below

<em>#include <iostream>  </em>

<em>#include <iomanip> </em>

<em>using namespace std;  </em>

<em>int main()  </em>

<em>{  </em>

<em> // Initializing the double value</em>

<em> double number = 12.3456;  </em>

<em> //Print  result</em>

<em> cout << setprecision(2)<< fixed << number;  </em>

<em> return 0;  </em>

<em>}  </em>

<em />

4 0
3 years ago
How did<br> technological artifacts evolved over time?
adell [148]
With helping us communicate with each other and around the world with the internet and other different types of things like,Tesla’s,phones,touch screen IPads,even having a built in TV plane
3 0
2 years ago
I have been trying to use brainly recently but i cant because everytime i watch an ad to get an answer, its an interactive ad, s
Troyanec [42]

Answer:

remove ads

Explanation:

by buying a no ad pack

5 0
2 years ago
Other questions:
  • What is the output after the following code executes?
    14·1 answer
  • As part of his proofreading process, and to catch any spelling or grammar mistakes, John uses this feature in Word Online to hav
    7·1 answer
  • When using correct ergonomic technique be sure to
    6·2 answers
  • With a web app, much of the program code for the software runs locally on a computer, instead of running on a remote computer co
    13·1 answer
  • Select the correct answer.
    6·1 answer
  • If you go over 255 in RGB by 1 does it reset to 0 or 1
    11·1 answer
  • John is runnig his Database application on a single server with 24 Gigabytes of memory and 4 processors. The system is running s
    6·1 answer
  • Part 1: For this assignment, call it assign0 Implement the following library and driver program under assign0: Your library will
    5·1 answer
  • What is the relationship between agile teams and project requirements
    9·1 answer
  • Write a java code to print Multiplication Table Till 20
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!