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
Irina-Kira [14]
3 years ago
6

Write a C program that uses a while statement to determine and print the largest of 10 numbers input by the user. Your program s

hould use three variables, as follows: a) counter--A counter to count to 10 (i.e., to keep track of how many numbers have been input and to determine when all 10 numbers have been processed). by) number--The current number input to the program. c) largest--The largest number found so far.
Computers and Technology
1 answer:
Kamila [148]3 years ago
5 0

Answer:

The program in C is as follows:

#include <limits.h>

#include <stdio.h>

int main(){

   int count = 0;

   int number, largest = INT_MIN;

   while(count<10){

       scanf("%d",&number);

       if(number>largest){

           largest = number;        }

       count++;    }

   printf("Largest: %d",largest);

   return 0;

}

Explanation:

This initializes count to 0

   int count = 0;

This declares number and largest; largest is also initialized to the smallest integer

   int number, largest = INT_MIN;

This loop is repeated while count is less than 10

   while(count<10){

Get each number

       scanf("%d",&number);

If current input is greater than the largest integer, largest is updated to the current input

<em>        if(number>largest){</em>

<em>            largest = number;        }</em>

Increase count by 1

       count++;    }

Print the largest

   printf("Largest: %d",largest);

You might be interested in
I get brainlist to whoever can help my computer is doing this and I have class and it’s not working and I got it wet yesterday b
liq [111]

Answer:

try putting a lot of rice on the screen.

Explanation:

if it got water in it that should help it.

3 0
2 years ago
Read 2 more answers
The incompatibilities in speed between the various devices and the CPU make I/O synchronization difficult, especially if there a
Iteru [2.4K]

Answer:

In a buffer

Explanation:

We can define a buffer as a temporary holding area for data between the various devices and the CPU make I/O synchronization especially if there are multiple devices attempting to do I/O at the same time.

Items stored at the buffer helps to reduce the The incompatibilities in speed between the various devices and the CPU.

3 0
3 years ago
Blurring in a photograph can be due to _____ or ______.
scoray [572]
Do you have options? In my personal opinion, however, blur could be caused by motion blur, or focusing on the wrong thing, Hope this helps any!
4 0
3 years ago
Read 2 more answers
Which class of fire extinguisher is appropriate for a fire involving electrical/energized electrical equipment?
krok68 [10]
The answer would be a C class fire extinguisher. 
6 0
3 years ago
Read 2 more answers
A python package used in text analysis and natural language processing. True or False
allsm [11]

Answer:

"True" is the correct answer for the above question.

Explanation:

  • There are so many python package which is used in NLP and text analysis.
  • The NLP is a concept in which the system is being interact with the human language and able to understand the human language. This provide the system which is used to intract the computers and humans.
  • The library which is used in NLP are The Conqueror: NLTK, The Prince: TextBlob.
  • The above question also states that there is a library, so it is true statement.
5 0
3 years ago
Other questions:
  • Part 1 Given 3 integers, output their average and their product, using integer arithmetic. Ex: If the input is 10 20 5, the outp
    6·1 answer
  • A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To ac
    14·2 answers
  • Analyze the following output public class Test{ public static void main(String args[]){ int[] x={1,2,3,4}; //here declare array
    9·1 answer
  • What is a spreadsheet program?<br> A spreadsheet program is a computerized version of _______
    5·1 answer
  • What is the family access code right now?
    5·1 answer
  • What is the most vulnerable information that should be protected to prevent unauthorized access to your online files and records
    8·1 answer
  • List and describe each of the activities of technology
    11·1 answer
  • Which of the following screen elements is a horizontal bar that displays at the
    8·1 answer
  • 1. Give one reason why data is represented in binary in a computer [1]
    10·1 answer
  • List and describe four services that comprise IT infrastructure, beyond physical devices and software applications.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!