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
Dahasolnce [82]
3 years ago
6

Write a while statement that prints all even numbers between 1 and 100 to the screen.

Computers and Technology
1 answer:
Marrrta [24]3 years ago
8 0

Answer:

Following are the while loop in c language.

while(i<100)

   {

if(i%2==0)

{

printf("%d",i);

printf("\n");

}

++i;

 }

Explanation:

Following are the code in c language.

#include<stdio.h> // header file

int main() // main function

{

   int i=1; // variable declaration

   while(i<100) // check the condition between 1 to 100

   {

if(i%2==0) // check that number % 2 ==0

{

printf("%d,",i); // print the number

}

++i;

 }

   return 0;

}

Output:

2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,

 

You might be interested in
What happens when your computer is in hibernate mode??
Alina [70]
I think hibernate is sort of like sleep mode. It puts your computer on low battery, but it's not turn off. And some unsaved information doesn't get erase.
6 0
3 years ago
Read 2 more answers
write a python function that takes the largest and smallest numbers in a list, and swap them (without using min() or max() )
Akimi4 [234]

Answer:

def SwapMinMax ( myList ):

   myList.sort()

   myList[0], myList[len(myList)-1] = myList[len(myList)-1], myList[0]

   return myList

   

Explanation:

By sorting the list, you ensure the smallest element will be in the initial position in the list and the largest element will be in the final position of the list.

Using the len method on the list, we can get the length of the list, and we need to subtract 1 to get the maximum element index of the list.  Then we simply swap index 0 and the maximum index of the list.

Finally, we return the new sorted list that has swapped the positions of the lowest and highest element values.

Cheers.

8 0
3 years ago
Does anyone want to play nitro type with me for my typing class I put 100 points into this so If you put link or random stuff I
Tju [1.3M]

Answer:

okay

so what is it what is your question..

7 0
3 years ago
What are the major features of React?
marysya [2.9K]

<em>JSX - JavaScript Syntax Extension. JSX is a syntax extension to JavaScript. </em>

<em>Virtual DOM. React keeps a lightweight representation of the “real” DOM in the memory, and that is known as the “virtual” DOM (VDOM)</em>

<em>Performance. ...</em>

<em>Extensions. ...</em>

<em>One-way Data Binding. ...</em>

<em>Debugging. ..</em><em>.</em>

<em>Components. ...</em>

<em>State.</em>

3 0
3 years ago
When pasting a circle drawn by the presentation software drawing tool into a spreadsheet, that circle will go into the selected
puteri [66]

False.

When you copy an object/image or insert it manually into an Excel spreadsheet cell, what will happen is that the object will lie on a separate layer and it will float on the sheet independently from the cell. If you want it embedded inside the cell, you can either resize both the picture and adjust the cell or merge the cells.  


3 0
3 years ago
Read 2 more answers
Other questions:
  • Show what this program prints. Be exact and complete. Can you explain the behavior of each print statement? 1 2 3 4 5 6 7 public
    12·1 answer
  • In 3–5 sentences, describe how technology helps business professionals to be more efficient.
    7·2 answers
  • We want to make a row of bricks that is goal inches long. We have a number of small bricks (1 inch each) and big bricks (5 inche
    5·1 answer
  • Water is constantly in motion.<br> True or false
    6·1 answer
  • Which of these devices collects the most information on network activity?
    11·1 answer
  • What online server provides you space to store and launch your website?
    11·1 answer
  • How to post a answer
    7·1 answer
  • A file named "games.txt" exists and has 80 lines of data. You open the file with the following line of code.
    7·2 answers
  • Which type of software is created on user dimension​
    5·1 answer
  • Following rules of compaction, the IPv6 address 2001:0db8:0000:0000:0000:ff00:0012:3456 could also be written as _______.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!