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
N76 [4]
2 years ago
10

Write a program in C which asks the user for 10 integers and prints out the biggest one.

Computers and Technology
1 answer:
Anni [7]2 years ago
5 0

Answer:

Following are the program in c language

#include<stdio.h> // header file

int main() // main function

{

   int ar[10],k,biggest; // variable declaration

   printf("Enter the ten values:\n");

   for (k = 0;k < 10; k++)  

   {

      scanf("%d", &ar[k]); // user input of 10 number

   }

   biggest = ar[0]; // store the array index of 0 into biggest variable

   for (k = 0; k< 10; k++) // finding the biggest number  

   {

    if (ar[k] >biggest)  

    {

    biggest = ar[k];

   }

   }

printf(" biggest num is %d", biggest); // display the biggest number

return 0;

}

Output:

Enter the ten values:

12

2

4

5

123

45

67

453

89

789

biggest num is 789

Explanation:

Here we declared an array ar[10] of type int which store the 10 integer values.

Taking 10 integer input from the user in array ar .After that iterating the loop and finding the biggest number by using if statement  and store the biggest number in biggest variable .

Finally display biggest number.

You might be interested in
Which of the following is equivalent to (p&gt;=q)? <br> i) P q iv) !p Where are genius people?:)
Elena L [17]

Answer:

Explanation:

This is unsolvable if you have no variable substitutes

4 0
2 years ago
4. is the disappearance of the individual a bad thing?
makkiz [27]

Answer:

The program completed in a third of the time with six computers versus one computer.

Explanation:

7 0
2 years ago
3. Find the best.
Tamiku [17]

Answer:

1. is the answer

Explanation:

<h2>mark me as brainlest</h2>

6 0
2 years ago
How many channels can the 2.4 GHz band be divided into?
wlad13 [49]

Answer:Fourteen channels

Explanation:

8 0
2 years ago
Sorts by value in reverse order; keeps the same key
KATRIN_1 [288]

Answer:

rsort()

Explanation:

the sorting function is used to sort the elements in the array.

the sorting can be increasing or decreasing, depends on the function used.

let discuss the option:

a. sort()

this is the sorting function, it used to sort the array in ascending order.

b. arsort()

this is also sorting function, it used to sort the associated array in descending order according to the value.

d. asort()

this is also sorting function, it used to sort the associated array in ascending order according to the value.

c. rsort()

this is the sorting function, it used to sort the array in descending order.

Therefore, the correct answer is rsort().

4 0
3 years ago
Other questions:
  • Is it better to meet online or offline<br> (Please answer QUICK)<br><br> Thanks :')
    5·2 answers
  • In python,_______ are used to define the conditions necessary for a while loop to run.
    7·2 answers
  • If you want to conserve ink or toner, you can instruct powerpoint to print ____ documents.
    6·1 answer
  • Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with two
    12·1 answer
  • What type of Microsoft Server serves as an email server?
    7·2 answers
  • Explain the main components of a computer system​
    12·1 answer
  • Computer science practical on VB.NET. program 1. program to find the square of a number. write the code achieve it​
    6·1 answer
  • What is e banking effects
    7·1 answer
  • A company is looking for an employee to help organize customer information for the sales team. Which computer field includes thi
    15·2 answers
  • How desktop case or chassis designed?, material and steps?​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!