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
raketka [301]
3 years ago
13

Write a program that asks you to enter some integers, and press "enter" after each one.

Computers and Technology
1 answer:
Bogdan [553]3 years ago
5 0

Answer:

// here is code in c++.

// headers

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// variables

int num;

cout<<"enter an integer (0 to stop):";

// read the integer

cin>>num;

// read integer until user enter 0

while(num)

{

cout<<"enter an integer (0 to stop):";

cin>>num;

}

//if input is 0 then print "exit"

cout<<"exit"<<endl;

return 0;

}

Explanation:

Declare a variable "num" to read input from user.Read input integer until

user enter 0 as input.When user enter 0 then program will print "exit" and

end the program.

Output:

enter an integer (0 to stop):2

enter an integer (0 to stop):-2

enter an integer (0 to stop):4

enter an integer (0 to stop):10

enter an integer (0 to stop):123

enter an integer (0 to stop): 0

exit  

You might be interested in
Cuando fue creada la aplicación Adobe Photoshop (creada, no lanzada)
Cloud [144]

Answer:

en el año 1991

Explanation:

:)

4 0
2 years ago
Which phrase is the best definition of social media?
Nataly [62]

A. Media designed for sharing information and promoting social

interactions

8 0
2 years ago
No spamming or links
Hitman42 [59]
I think the answer is true,
8 0
2 years ago
Read 2 more answers
I still need help, thank you! Will give Brainliest ​
wlad13 [49]

Answer: 1 what do u think to help u

6 0
3 years ago
Sarah wants to calculate how much of a profit she would make on producing and selling a new product. Sarah should use a _____.
vagabundo [1.1K]
The answer is spreadsheet. I just did this lesson and I got all of the answers right so I know it's correct.
4 0
3 years ago
Other questions:
  • c++ design a class named myinteger which models integers. interesting properties of the value can be determined. include these m
    14·1 answer
  • ICT excel data homework
    10·1 answer
  • PLEASE PLEASE PLEASE PLEASE PLEASE HELP! I'M BEGGING Y'ALL! I NEED THIS FOR TODAY! CORRECT ANSWERS WILL BE AWARDED BRAINLIEST!
    6·1 answer
  • Write a paragraph on the following topic.
    14·1 answer
  • In what year did the manager and team depicted in the blockbuster film "Moneyball
    9·1 answer
  • Anyone wanna play Smash Ultimate. I'm a Link main (that doesn't mean I camp, thats young link) who plays competitve with legal s
    8·1 answer
  • Similarities between inline css and internal css​
    6·1 answer
  • Plz subscribe my yt gaming channel <br>FIREAZZ GAMING​
    8·2 answers
  • What's the maximum number of ad extensions that can show for a particular query or device at any given time?
    13·1 answer
  • Question 2 of 10
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!