Computers and Technology

Write a for loop to print all elements in coursegrades, following each element with a space (including the last). print forwards, then backwards. end each loop with a newline. ex: if coursegrades = {7, 9, 11, 10},
print:
7 9 11 10
10 11 9 7

hint: use two for loops. second loop starts with i = num_vals - 1.

#include

int main(void) {
const int num_vals = 4;
int coursegrades[num_vals];
int i = 0;
coursegrades[0] = 7;
coursegrades[1] = 9;
coursegrades[2] = 11;
coursegrades[3] = 10;

/* your solution goes here */
return 0;
}

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 19:40, queenskyyt
Write the quartstogallons java class that declares a named constant to hold the number of quarts in a gallon (4). also declare a variable to represent the number of quarts needed for a painting job, and assign an appropriate value—for example, 18. compute and display the number of gallons and quarts needed for the job. display explanatory text with the values, for example:
Answers: 2
image
Computers and Technology, 21.06.2019 20:50, Lydiac9243
Write a method in the heapintpriorityqueue class called merge that accepts another heapintpriorityqueue as a parameter and adds all elements from the other queue into the current queue, maintaining proper heap order such that the elements will still come out in ascending order when they are removed. your code should not modify the queue passed in as a parameter. (recall that objects of the same class can access each other's private fields.)
Answers: 2
image
Computers and Technology, 22.06.2019 23:00, cchotshot
Is an attack that relies on guessing the isns of tcp packets
Answers: 2
image
Computers and Technology, 23.06.2019 08:30, Bradgarner772
Based on your knowledge of a good network, describe what you think is a perfect network would be. what kind of information and resources could users share on this network. what would the network administrator do? what kind of communication would be used?
Answers: 1
Do you know the correct answer?
Write a for loop to print all elements in coursegrades, following each element with a space (includi...

Questions in other subjects:

Konu
History, 28.10.2019 12:31
Konu
Mathematics, 28.10.2019 12:31