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
vlabodo [156]
3 years ago
12

C - Language Write three statements to print the first three elements of array runTimes. Follow each statement with a newline. E

x: If runTimes[5] = {800, 775, 790, 805, 808}, print: 800 775 790#include int main(void) {const int NUM_ELEMENTS = 5;int runTimes[NUM_ELEMENTS];int i;for (i = 0; i < NUM_ELEMENTS; ++i) {scanf("%d", &(runTimes[i])); }/* Your solution goes here */
return 0;}
Computers and Technology
1 answer:
Jobisdone [24]3 years ago
8 0

Answer:

Replace

/* Your solution goes here */

with

printf("%d",runTimes[0]);

printf("%d",runTimes[1]);

printf("%d",runTimes[2]);

Explanation:

The question requires that the first three elements of array runTimes be printed;

The first three elements are the elements at the first, second and third positions.

It should be noted the index of an array starts at 0;

  • So, the first element has 0 as its index
  • The second has 1 as its index
  • The third has 2 as its index

So, to make reference to the first three elements, we make use of

<em>runTimes[0], runTimes[1] and runTimes[2]</em> respectively

Having mention the above;

It should also be noted that array is of type integers;

So, to display integers in C, we make use of "%d";

Hence, the print statement for the first three elements is

printf("%d",runTimes[0]);

printf("%d",runTimes[1]);

printf("%d",runTimes[2]);

You might be interested in
What keyboard combination can you use to open the windows tool context menu, which contains options such as power options and di
Shkiper50 [21]
Windows button and x
8 0
3 years ago
Which website domains are most credible?
Leokris [45]

Credible websites usually end in the domain name .org or .edu

3 0
3 years ago
Read 2 more answers
Leo lives in a two-story home in an upscale neighborhood, drives a brand-new sports car, and makes more than $250,000 per year.
prisoha [69]
(D) Standard of living. Because, from this text you can tell that Leo is a wealthy person, and welthy people tend to get the best things, including fancy neighborhoods and Cars. So its most likely (D)
5 0
3 years ago
Read 2 more answers
Which of the following is not a type of bank? (Everfi)
Zinaida [17]

Answer

Pay Day Lender

Explanation

A bank is a financial institution which is authorized by the government to accept deposits inform of cash or cheque from the public who are the customers, and it creates a credit. It saves money to for the customers and also provides security for the customers money. It also lends money to the customers as loan where they pay with interest within a given time. There are many types of banks which include credit unions, online banks,industrial, agricultural, retail banks and many others.

3 0
3 years ago
Read 2 more answers
JAVA Code:
Burka [1]
Dear ,you should ask it on stackoverflow and geekforgeelks , not here
6 0
3 years ago
Other questions:
  • #include &lt;iostream&gt;
    9·1 answer
  • If the physical memory size is doubled without changing any of its other parameters, the number of entries in the page table
    5·1 answer
  • Once a virus has been removed by your anti-virus program, all traces of it are gone from your computer.
    9·1 answer
  • Name an analog quantity other than temperature and sound
    13·1 answer
  • Which of the following operating systems includes a virtual assistant?<br> Group of answer choices
    8·1 answer
  • During her presentation, Marie wanted more freedom to move about the room and interact with her audience. She can use _____.
    10·1 answer
  • Drag the right word to it’s definition
    13·1 answer
  • I think you have been doing a great job but you haven’t been signing many people up for our new service feature I want you to se
    8·1 answer
  • I need help!!!! 1.04
    9·1 answer
  • I came here for a answer so why did i get a pep talk
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!