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
Maksim231197 [3]
4 years ago
13

Write a while loop that prints

Computers and Technology
1 answer:
Nana76 [90]4 years ago
6 0

Answer:

The program to this question as follows:

Program:

#include <iostream> //defining header file

using namespace std;

int main() //defining main method

{

int squ=0,n=0; //defining variable

cout<<"Square between 0 to 100 :"; //message

while(n<100) //loop for calculate Square

{

n=squ*squ; //holing value in n variable

cout<<n<<" "; //print Square

squ++; //increment value by 1

}

cout<<endl; //for new line

n=1; //change the value of n

cout<<"Positive number, which is divisible by 10: "; //message

while (n< 100) //loop for check condition

{

if(n%10==0) //check value is divisible by 10

{

cout<<n<<" ";//print value

}

n++; //increment value of n by 1

}

cout<<endl; //for new line

cout<<"Powers of two less than n: "; //message

n=1; //holing value in n

while (n< 100) //loop for check condition

{

cout<<n<<" ";//print value

n=n*2; //calculate value

}

return 0;

}

Output:

Square between 0 to 100 :0 1 4 9 16 25 36 49 64 81 100  

Positive number, which is divisible by 10: 10 20 30 40 50 60 70 80 90  

Powers of two less than n: 1 2 4 8 16 32 64  

Explanation:

In the above program, two integer variable "squ and n" is defined, then three while loop is declared, which is used to calculate different values, that can be described as follows:

  • In the first while loop both "n and squ" variable is used, in which n is used for check range and "squ" is used to calculate the square between 1 to 100.
  • The second, while it is used to calculate the positive number, which is divisible by 10, in this only n variable is used, that calculates the value and check its range.
  • Then the last while loop is used which is used to calculate the double of the number, which is between 1 to 100 range.  
You might be interested in
How to bold words in microsoft word
kondor19780726 [428]

Answer:

highlight what you want to bold and then press CTRL+B.

Explanation:

Hope this helped.

5 0
3 years ago
By default, tables are sorted in ascending order by this.<br><br><br> What’s the answer?
raketka [301]

Answer:

Record number

Explanation:

It simply can't be "data type" as there cant be more than one data type in a field. It won't be "primary key field" either as primary keys only set the field as unique. You can test this by changing the primary key to a different field. But for simplicity's sake, I did this experiment for you.

As you can see in the first and second attachments, ID is the primary key, set default by the program.

But when I set Field 8 as the primary key, shown in the third attachment, field 8 doesn't sort, shown in the fourth attachment.

5 0
3 years ago
Read 2 more answers
What is Geocortex and how does it work in web or mobile?
RoseWind [281]

Explanation:

Geocortex -

Geocortex mobile is the framework which is a native application for the different mobile OS such as iOS, Android, and Windows. It is built on the version of Esri’s ArcGIS Run time SDK for the .NET.

The Geocortex mobile Designer which is a browser-based configuration tool which is designed to simplify the experience combined with the Geocortex mobile, can make this the work leading framework and building the mobile offline apps on the Esri’s ArcGIS Run time .

The Geocortex mobile framework has many features which are building cutting-edge apps from the browser and optimizing the apps for mobile and also offline environments. We can also use the Geocortex Workflow for building the end-user interactions and also for any business process .

6 0
3 years ago
please write out an accurate code for the question below also please explain or I'll report you ( Thanks :) )
leva [86]

Answer: hmmmm i feel like u have to move the thingy thats shooting that light down 1 unit so it can move the planet.

Explanation: moving it down 1 unit will put it at the perfect angle to push the planet. :/

6 0
2 years ago
Read 2 more answers
When you hear the word “stress” what does it mean to you? How does stress affect you and what do you do to cope with stress
stepan [7]

   Ways to Cope with  Stress

  • Re-balance Work and Home.
  • Build in Regular Exercise.
  • Eat Well and drink lots of water.
  • Connect with Supportive People.
  • Carve out Hobby Time.
  • Practice Meditation, Stress Reduction or Yoga.
  • Sleep Enough.
  • Bond with Your Pet.

 

hope it helps! :)

3 0
3 years ago
Other questions:
  • What is TCP/IP's Transport layer's primary duty?
    8·1 answer
  • The cmos memory located on the motherboard is often referred to as _____ memory because of its capability to store bios settings
    9·1 answer
  • What is one characteristic of a logic problem? A). a problem that can have three solutions B). a problem that can be solved in a
    5·1 answer
  • Where could an identity theft access your personal information
    9·2 answers
  • The last step on Kotter’s Eight-Step Change Model is to anchor the changes in corporate culture; to make anything stick, it must
    14·1 answer
  • Anyone know the name of this font? and what site i can find it on so i can type it????
    8·1 answer
  • 8. How can you prevent your VMs receiving DHCP server messages from unauthorized virtual machine pretending to be DHCP servers?
    6·1 answer
  • The documents created in ms-excel is call what?​
    11·2 answers
  • Define- Emerging technology
    14·1 answer
  • 11. You tried to turn on your desktop computer, but your desktop computer would not even turn on. You pressed the power button,
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!