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
what is the primary way to access applications in windows 8? a. control panel b. start menu c. desktop tiles d. context menu
kow [346]
In Windows 8, when you hit the Windows icon (in previous versions known as the start menu) it takes you to a separate page of tiles where all your applications and programs are. The easiest way to access your most needed programs and files is to create a shortcut on your desktop. This makes C. Desktop Tiles your primary way to access applications
6 0
3 years ago
DJ Davon is making a playlist for an internet radio show; he is trying to decide what 1212 songs to play and in what order they
Alja [10]

There are some typos in this question as the numbers become too large and lead to undefined during calculations.

so the correct data is:

Songs = 12

Rock = 15

Blues = 20

Disco = 15

The answer & explanation for this question is given in the attachment below.

4 0
3 years ago
Which features would work well for text entered into cells? Check all that apply.
yKpoI14uk [10]

Which features would work well for text entered into cells?

All the features given apply to text entered into a cell.

thesaurus , spelling , autosum , average , find , replace​

Explanation:

  • The tasks are referred to as basic tasks and include such operations as inserting and typing over, copying and moving items, finding and replacing text, undoing and redoing commands, checking spelling and grammar, using the thesaurus, and using formatting tools.
  • A thesaurus is used on a computer while writing an e-mail, letter, or paper to find an alternative meaning for words. For example, repeating the same word throughout your writing can become repetitive to a reader, and you could use a thesaurus to get a synonym of the word
  • Spelling is defined as the proper way to write a word, using the correct order of letters. This feature is provided by Excel for the cells.
  • AutoSum is a Microsoft Excel and other spreadsheet program function that adds together a range of cells and displays the total in the cell below the selected range.
  • The AVERAGE function calculates the average of numbers provided as arguments. To calculate the average, Excel adds the numbers together and divides by the total number of values supplied.
  • The
  • Microsoft Excel FIND function returns the location of a substring in a string. The search is case-sensitive. The FIND function is a built-in function in Excel that is categorized as a String/Text Function.
  • The Microsoft Excel REPLACE function replaces a sequence of characters in a string with another set of characters. The REPLACE function is a built-in function in Excel that is categorized as a String/Text Function. It can be used as a worksheet function (WS) in Excel.
4 0
3 years ago
Read 2 more answers
Can you answer this question?
patriot [66]

Answer:

To do this you'll need to use malloc to assign memory to the pointers used.  You'll also need to use free to unassign that memory at the end of the program using the free.  Both of these are in stdlib.h.

#include <stdlib.h>

#include <stdio.h>

#define SIZE_X 3

#define SIZE_Y 4

int main(void){

       int **matrix, i, j;

       // allocate the memory

       matrix = (int**)malloc(SIZE_X * sizeof(int*));

       for(i = 0; i < SIZE_X; i++){

               matrix[i] = (int *)malloc(SIZE_Y * sizeof(int));

       }

       // assign the values

       for(i = 0; i < SIZE_X; i++){

               for(j = 0; j < SIZE_Y; j++){

                       matrix[i][j] = SIZE_Y * i + j + 1;

               }

       }

       // print it out

       for(i = 0; i < SIZE_X; i++){

               for(j = 0; j < SIZE_X; j++){

                       printf("%d, %d:  %d\n", i, j, matrix[i][j]);

               }

       }

       // free the memory

       for(i = 0; i < SIZE_X; i++){

               free(matrix[i]);

       }

       free(matrix);

       return 0;

}

3 0
3 years ago
1,2,3,4,5,6,7,8,9,10 – Best case - Sorted in ascending order
Pepsi [2]

Using the knowledge in computational language in python it is possible to write a code that from a random number draw creates an order of increasing numbers

<h3>Writting the code in python:</h3>

<em>def shellSort(array, n):</em>

<em>    # Rearrange elements at each n/2, n/4, n/8, ... intervals</em>

<em>    interval = n // 2</em>

<em>    while interval > 0:</em>

<em>        for i in range(interval, n):</em>

<em>            temp = array[i]</em>

<em>            j = i</em>

<em>            while j >= interval and array[j - interval] > temp:</em>

<em>                array[j] = array[j - interval]</em>

<em>                j -= interval</em>

<em>            array[j] = temp</em>

<em>        interval //= 2</em>

<em>data = [10,9,8,7,6,5,4,3,2,1]</em>

<em>size = len(data)</em>

<em>shellSort(data, size)</em>

<em>print('Sorted Array in Ascending Order:')</em>

<em>print(data)</em>

See more about python at brainly.com/question/18502436

#SPJ1

5 0
2 years ago
Other questions:
  • List of programming languages and their typing
    5·2 answers
  • Nvm, Its B.
    10·1 answer
  • What is the specifications, number of sales, positive and negative points and a few popular games of the first PlayStation?
    13·1 answer
  • Discuss two basic types of monitors CRT and LCD give me in short ​
    9·2 answers
  • What is HTML? (list down any 5 points)
    12·1 answer
  • What is the Cycle of Dependency?
    14·1 answer
  • At what layer in the TCP/IP protocol hierarchy could a firewall be placed to filter incoming traffic by means of:
    5·1 answer
  • How many ways are used to insert an image from file?koi h kya​
    10·1 answer
  • A(n) Blank______ database management system allows users to create, read, update, and delete data in a relational database. Mult
    9·1 answer
  • Bank Account Postings While reviewing your checking account balance online, you notice that debit card purchases have not posted
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!