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
Match the following tasks with their appropriate timing.
Oliga [24]

Answer:

3. 1. 2. daily, weekly, monthly

Explanation:

8 0
3 years ago
Explain where the “heart” of the station is and what can be found there? I will mark brainlyest! This is for the ISS (Internatio
Annette [7]

Answer:

Zevzda

Explanation:

Check for yourself if you think i'm wrong

7 0
2 years ago
Read 2 more answers
A search engine finds bugs and system failures in your computer.<br><br> True or False?
scZoUnD [109]
It is false search engine are used for searching for something
6 0
2 years ago
Read 2 more answers
Define
3241004551 [841]

Computational thinking- the thought processes involved in formulating a problem and expressing its solution(s) in such a way that a computer—human or machine—can effectively carry out. Computational Thinking is an iterative process based on three stages.

Problem solving process- The process of working through details of a problem to reach a solution. Problem solving may include mathematical or systematic operations and can be a gauge of an individual's critical thinking skills.

Data- facts and statistics collected together for reference or analysis.

Information- facts provided or learned about something or someone.

Algorithm- a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.

Aggregate data- aggregate data are data combined from several measurements. When data are aggregated, groups of observations are replaced with summary statistics based on those observations. In a data warehouse, the use of aggregate data dramatically reduces the time to query large sets of data.

Discovery Data- in the context of IT, is the process of extracting actionable patterns from data. The extraction is generally performed by humans or, in certain cases, by artificial intelligence systems.



3 0
3 years ago
A common use of color in a document is in Table Headers. Which of these is NOT a common way to use color in a table header.
Lesechka [4]
<span>Use a dark color with light-color text to contrast the headers with the data.</span>
3 0
3 years ago
Other questions:
  • In order to paint a wall that has a number of windows, we want to know its area. Each window has a size of 2 ft by 3 ft. Write a
    12·2 answers
  • Which of the following is NOT a fixed expense?
    6·1 answer
  • Consider the following threats to Web security, and describe how each is countered by a particular feature of SSL.
    15·1 answer
  • _____________ helps to control and limit the number of consecutive request failures that cross a threshold. Review breaker Micro
    7·1 answer
  • Business cards are generally designed so that this item stands out the most.
    8·1 answer
  • If the algorithm does not have instructions for unanticipated results, the computer program will a. solve a problem b. start ove
    6·1 answer
  • How has technology effected the way we communicate?
    5·1 answer
  • Hello pls answer<br><br><br>what is the use of loop in java​
    5·1 answer
  • Why is the song Twinkle Twinkle Little Star an example of ternary form?
    10·1 answer
  • What are village by laws​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!