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
Anyone got the edmentum computer programming post test answers?
Arturiano [62]

Answer:

yessir

Explanation:

7 0
3 years ago
Create an application named Percentages whose main() method holds two double variables. Assign values to the variables. Pass bot
lbvjy [14]

Answer:

The codes below implement the problem statements

Explanation:

public class Percentages {

public static void computePercent (int a,int b)

{

System.out.println(a+" is "+(a*100/b)+"% of "+b);    

}

 

public static void main(String []args)

{

int a=2;

int b=5;

computePercent(a,b);

computePercent(b,a);

}

}

<u> </u>

<u>Part(b) </u>

import java.util.*;

public class Percentages {

public static void computePercent (int a,int b)

{

System.out.println(a+" is "+(a*100/b)+"% of "+b);

}

 

public static void main(String []args)

{

Scanner s= new Scanner(System.in);

int a=s.nextInt();

int b=s.nextInt();

computePercent(a,b);

computePercent(b,a);

}

}

8 0
3 years ago
Hi guts gyt edgsahgflefljwegfwygafbhdshdnvcashD
lapo4ka [179]

Hello, how are you and welcome!

4 0
2 years ago
In ______ each station is assigned a code; using a special coding scheme, stations send data over the entire bandwidth of the ch
Viktor [21]

Answer:

CDMA is sa station.

Explanation:

CDMA is basically a Code Division Multiple Access .It is assgned code that facilitates the signals or special coding scheme.It optimizes the use of bandwidth, It is used in a UHF and send data over entire bandwidth of channel.It send data without sharing of capacity of channel. Its ranges is between 800 MHz and 1.9 GHz

4 0
3 years ago
To store non-duplicated objects in the order in which they are inserted, use:______
Umnica [9.8K]

Answer:

b. LinkedHashSet

Explanation:

A LinkedHashSet is an ordered version of HashSet that maintains a doubly-linked List across all elements. When the iteration order is needed to be maintained this class is used. LinkedHashSet maintains a linked list of the entries in the set, in the order in which they were inserted.

4 0
3 years ago
Other questions:
  • You would like to arrange the records alphabetically. You should _____.
    7·2 answers
  • The brainly home page uses about 112% of my cpu. (On chromebook) any ideas to help increase performance?
    7·2 answers
  • What are multiple worksheets
    7·1 answer
  • Jimmy and his friends are creating a rock band and have decided to turn his garage into a recording studio. He wants to sell the
    9·2 answers
  • What is a 96.1791 weighted gpa in a 4.0 scale?
    8·1 answer
  • The purpose of multivariate analysis in index construction is to discover the simultaneous interaction of the items to determine
    12·1 answer
  • A human interest story is an example of hard news.<br> O True<br> O False HEL
    15·1 answer
  • Make a list of five primary raw materials, for each one, indicate and industrial material that is created from it
    10·2 answers
  • Write a Scientific report modeling a written reasearch paper on big data applications.​
    6·1 answer
  • A large amount of data is stored in secondary storage is it true<br>​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!