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
Juli2301 [7.4K]
3 years ago
8

Write three statements to print the first three elements of vector runTimes. Follow each with a newline. Ex: If runTimes = {800,

775, 790, 805, 808}, print: 800 775 790
Computers and Technology
1 answer:
professor190 [17]3 years ago
7 0

Answer:

Following are the code to the given question:

#include <iostream>//header file

using namespace std;

int main()//main method

{

int runTimes[] = {800, 775, 790, 805, 808};//defining array of integer

for(int x=0;x<3;x++)//defining for loop to print three element of array value

{

printf("%d\n",runTimes[x]);//print array value  

}

return 0;

}

Output:

Please find the attached file.

Explanation:

In this code, an array integer "runTimes" is declared that holds the given array values, and in the next step, a for loop is declared.

Inside the loop, an integer variable x is declared that starts from 0 and ends when its value less than 3 in which we print the first three array element values.

You might be interested in
Define a function print total inches, with parameters num_feet and num_inches, that prints the total number of inches. Note: The
GenaCL600 [577]

Answer:

   <em>public static void printTotalInches(double num_feet, double num_inches){</em>

<em>        double inches = 12*num_feet;</em>

<em>        System.out.println("Total value in feets is: "+(inches+num_inches));</em>

<em>    }</em>

This function is written in Java Programming Language. Find a complete program with a call to the function in the explanation section

<em>Explanation:</em>

<em>public class ANot {</em>

<em>    public static void main(String[] args) {</em>

<em>//Calling the function and passing the arguments</em>

<em>    printTotalInches(5,8);</em>

<em>    }</em>

<em>    public static void printTotalInches(double num_feet, double num_inches){</em>

<em>        double inches = 12*num_feet;</em>

<em>        System.out.println("Total value in feets is: "+(inches+num_inches));</em>

<em>    }</em>

<em>}</em>

6 0
3 years ago
What is call by reference in function of c​
Vladimir [108]

Explanation:

The call by reference method of passing arguments to a function copies the address of an argument into the formal parameter. Inside the function, the address is used to access the actual argument used to call. It means the changes made to the parameter affect the passed argument.

3 0
4 years ago
How do I send the face to the back? Seriously, I can't find out how...
makvit [3.9K]

Answer:

i think you can layer it :)

Explanation:

nice drawing btw!

8 0
3 years ago
Practice with CSS. a. Write the CSS for an HTML selector footer with the following characteristics: a light-blue background colo
Nitella [24]

Answer:

Explanation:

/*# represents ID selector

*/

#feature{

font-family: 'Arial';

font-size: 10px;

color: red;

background: white;

width: 80%;

filter: drop-shadow(30px 10px 4px #4444dd);

}

8 0
3 years ago
Describe security risks associated with downloading items online
AURORKA [14]

Answer:

1. Hackers could get information and sell it. 2. Hackers can get a hold of your files online. 3. Hackers can look at your photos. Download a VPN

8 0
3 years ago
Other questions:
  • Give a big-O estimate for the number of comparisons used by the algorithm that determines the number of 1s in a bit string of le
    9·2 answers
  • Determine the number of bytes necessary to store an uncompressed binary image of size 4000 × 3000 pixels.
    9·1 answer
  • Discuss how advertising on the Web affects search results and the ethical dilemmas associated with it.
    5·1 answer
  • Which css property is used to change the text color of an element?
    15·1 answer
  • Does anyone take bca on plato
    11·1 answer
  • A cyber community is different than a physical community because _________________. A.people can go to restaurants to meet frien
    13·1 answer
  • How do u reverse image search on Android? ​
    9·1 answer
  • What is the output of the following program?
    11·2 answers
  • If you forget your privacy password what will you do if the ask this question what is the name of one of your teacher?​
    12·1 answer
  • When you _______ the top row or the left column, you can keep column headings and row labels visible as you scroll through your
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!