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
The basic input/output system (bios locates the boot loader program on a linux system by reading the __________ on the hard driv
Diano4ka-milaya [45]
If the disk was formatted with fdisk, the MBR (Master Boot Record).
6 0
3 years ago
By what decade were books readily available to the public across the United States and Europe?
Westkost [7]

Answer:

1690's hope i could help!

5 0
3 years ago
A check list should be based on that apply to your industry.
frozen [14]
Can you please elaborate? This is as your question isn't very clear.
6 0
3 years ago
Read 2 more answers
What is information technology?
nirvana33 [79]
Information technology is the application of computers to store, retrieve, transmit and manipulate data, often in the context of a business or other enterprise. 
7 0
3 years ago
How do I turn of the noise canceling feature on my beats studio wireless?
zysi [14]
You press and hold the "b" button on your left earmuff, but you have to hold it down as long as you want ANC (Automatic Noise Cancelling) to be turned off, in other words, as soon as you release the button, ANC will be turned back on. Unfortunately, this will also mute your music. 
5 0
3 years ago
Other questions:
  • To copy noncontiguous slides, open Slide Sorter view, click the first slide thumbnail, press and hold ____, click each additiona
    15·1 answer
  • Frank is a writer. He needs to work for long hours and type for long periods on the computer. What injury can Frank develop?
    15·2 answers
  • If you implement a Wireless LAN (WLAN) to support connectivity for laptops in the Workstation Domain, which domain does WLAN fal
    5·1 answer
  • X = 19 y = 5 print (x % y)
    11·1 answer
  • Write a MATLAB program to accomplish the following: Create two vectors, a and b, where vector a contains all positive integers l
    10·1 answer
  • Nielsen purchases scanner data from retail transactions to track the sales of consumer packaged goods, gathered at the point of
    14·1 answer
  • You might have trouble interpreting a message if:
    15·1 answer
  • The theory of logic set the foundation for what aspect of computing today?
    11·1 answer
  • A ______ is a portable device for recording audio and video.
    10·2 answers
  • (Please answer both parts, please)
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!