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
Jacobson furniture pseudo-code
romanna [79]

Answer:

We need to add four labels Taxable Income, Tax rate, total tax, and Total Due. And in front of them, you can add four textBoxes, or labels or as required.

The Tax rate is 5%.

And

Explanation:

BtnCalc_Click will calculate and display in lblTax

double tax = Convert.ToDouble((textBox1.Text)) * 5/100;

double Roundedtax = Math.Round(tax, 2);

textBox2.Text = Convert.ToString(Roundedtax);

textBox2.Show();

// we can use lblTax instead of textBox2. The further code will be almost change, and we need to use lblTax label instead of textBox2.Text.

BtnCalc_Click will calculate and display in lblTotal

textBox3.Text = Convert.ToString(Convert.ToDouble(textBox1.Text) + Convert.ToDouble(textBox2.Text));

textBox3.Show();

//This is lblTotal or the total Tax. We can use lblTotal label instead of the textBox3.Text.

BtnExit_Click will end the application:

Use this code in this method.

this.Close();

// This closes the application immediately on click on the Exit button.

5 0
4 years ago
FOR CALL OF DUTY MOBILE GAMERS PLS HELP!
statuscvo [17]

since the app are two different things its crucial to have a activision account, though the progress wont be reset unless you do have an activision account

8 0
2 years ago
A folder can contain only files? A. True B.False
choli [55]
That statement is true.
In recent technologies, folder can contain whatever users want it to contain.  Not only, that, users could also arrange the maximum size of files that a folder could contain or the visibility status of each items that will be placed on the shoulder in case they need some sort of privacy for his/her files

8 0
3 years ago
Read 2 more answers
What is the name of situation where the same data is stored unnecessarily at different places?
Delicious77 [7]

Answer:

Data redundancy.

Explanation:

A database management system (DBMS) can be defined as a collection of software applications that typically enables computer users to create, store, modify, retrieve and manage data or informations in a database. Generally, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

A data dictionary can be defined as a centralized collection of information on a specific data such as attributes, names, fields and definitions that are being used in a computer database system.

In a data dictionary, data elements are combined into records, which are meaningful combinations of data elements that are included in data flows or retained in data stores.

Data redundancy is the name of situation where the same data is stored unnecessarily at different places.

Simply stated, data redundancy can be defined as a condition which typically involves storing the same data in multiple storage locations. Thus, data redundancy connotes the unnecessary repetition of the same piece of data (informations) either deliberately or for some specific reasons.

3 0
3 years ago
8.10 LAB: Convert to binary - functions Write a program that takes in a positive integer as input, and outputs a string of 1's a
Korvikt [17]

Answer:

// This program is written in C++ programming language

// Comments are used for explanatory purpose

// Program starts here

#include <iostream>

#include <string>

using namespace std;

// Declare variables

int inputvar;

// Declare output variable as array

int outputvar[32];

// Set a counter for binary array

int i = 0;

while (inputvar > 0) {

// Divide inputvar by 2 and store remainder in outputvar

outputvar[i] = n % 2;

inputvar/=2;

i++; // increment i by 1

}

// End of division

// Prin resulting array in reverse order

for (int j = i - 1; j >= 0; j--) {

cout << outputvar[j];

}

return 0;

}

// End of Program

3 0
4 years ago
Other questions:
  • Which company is credited with solving a problem by creating a program that could work on all computers?
    11·1 answer
  • Under what category of programs and apps do screen savers and backup programs fall?
    10·1 answer
  • Complete the following statements by choosing the correct answer from the drop-down menus.
    14·1 answer
  • if you play creative destruction and if u have a mic and if u play it 24/7 and would like to form a team tell me your name or yo
    7·1 answer
  • Which approach to knowledge management capitalizes on tacit knowledge and requires heavy IT investment?
    8·1 answer
  • I'm very confused about this, I am seeing multiple different answers and I thought the answer was obvious, but guess not.
    15·2 answers
  • Star and peer-to-peer are types of
    9·2 answers
  • Given the message size of 16Kb, packet size of 2Kb, speed of 4Kbps over 3 links, how much time, will it take the message to trav
    6·1 answer
  • Why, during the final stage of the multistage model for e-commerce, is comprehensive customer information captured in the suppli
    7·1 answer
  • Kevin, a manager at FitPlus fitness club, owns a website that updates information regarding his fitness club. He created backgro
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!