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
Temka [501]
3 years ago
9

If you want a user to enter exactly 20 values, which loop would be the best to use?

Computers and Technology
1 answer:
Hitman42 [59]3 years ago
4 0

Answer: For loop

Explanation:

Using the for loop we can get the exact number of values/outcomes we require.

For example:    printf(enter 20 numbers");

                               for(int i=0; i<20;i++)

                               {

                                       scanf("%d", &number);

                                }

So, this is an implementation of for loop in C. Using it we can enter exact 20 numbers not less or more than that.

Therefore, for loop is the answer.

You might be interested in
Create a new Java program called MyInfo. Create one or more method(s) that pass the following information as parameters and prin
Vladimir79 [104]

Answer:

Answered below

Explanation:

//Program in Java

class MyInfo{

public static void main (String args []){

myFullName("John", "Doe");

myAgeMajorGPA(20, "Biology", 4.3);

}

public void myFullName(String initialName, String middleName){

System.out.println(initialName);

System.out.print(middleName);

}

public void myAgeMajorGPA(int age, String major, double GPA){

System.out.println(age);

System.out.println(GPA);

System.out.print(major);

}

}

3 0
2 years ago
Look at the following code.int x = 7;int *iptr = &amp;x;What will be displayed if you send the expression *iptr to cout ? What h
masha68 [24]

Answer:

The answer to the given question can be given as:

The value of *iptr is 7. and the value of iptr is dynamic.

Explanation:

In the c++ code, it is defined that x is an integer variable that assigns a value which is 7. Then we define a pointer variable that is *iptr. This variable holds an address of the x variable. When we print the value of the iptr variable. if we use the expression *iptr to print value of the pointer variable by cout that is used in c++ for pint values. so the value of the iptr is 7. If we use the expression iptr sent to cout so we show the address of the variable x. In the pointer, it manages the addresses of dynamically allocated so the address of the variable is changed on execution time.

4 0
3 years ago
The information of an management information system comes from?
Debora [2.8K]

A management information system is a computer system consisting of hardware and software that serves as the backbone of an organization's operations

5 0
1 year ago
True or Flase<br><br> In C++, the body of a for loop may never run even once.
stiks02 [169]

Answer: True

Explanation: For loop is used in the C++ programming is defined as the statement that defines about the flow control .This loop works under some condition that is considered.

For loop is evaluated to execute for one time if the statement condition is true but there are also chances of no execution at all because of the incorrect condition. So, for loop might not run even once in that condition.Thus , the statement given is true.

3 0
3 years ago
HEEEEELPPP!!!BRAINLIEST!!! THIS IS URGENT!!!
Fittoniya [83]

Answer:

Begin the statement with the proper keyword to start the loop

Explanation:

Given

The code segment

Required

Fix the code

The first line of the code segment is meant to be a for loop, but it does follow the right syntax.

This is so because the for keyword is missing.

The first line should be corrected and replaced with:

for count in range(80):

Hence, option (b) is correct

4 0
2 years ago
Other questions:
  • 3. If B3=6 and D5=8, what would the following function return? IF(B3&gt;D5, "Closed", D5-B3) *
    10·2 answers
  • Less than 40 percent of teens have used marijuana within the past year. True or false?
    8·1 answer
  • To select all the text in a document, press ____.
    12·2 answers
  • Assume the existence of a Window class with a function getWidth that returns the width of the window. Define a derived class Win
    15·1 answer
  • Drag each label to the correct image.
    9·2 answers
  • Who was the creator of the game Fnaf?
    11·2 answers
  • Create an array of numbers filled by the random number generator. (value = (int)(Math.random() * 100 + 1);) Print the array and
    9·1 answer
  • A(n) _____ is a firm that delivers a software application, or access to an application, by charging a usage or subscription fee.
    6·1 answer
  • Write a loop that reads positive integers from console input, printing out those values that are even, separating them with spac
    15·1 answer
  • A word or phrase to help identify a file when you do not know the file name during the file expiration search
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!