subject

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;
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:30
The next button in the review section shows the next available comment. next slide with no comment. previous comment. edited comment.
Answers: 1
question
Computers and Technology, 23.06.2019 10:20
Suppose there is a relation r(a, b, c) with a b+-tree index with search keys (a, b).1. what is the worst-case cost of finding records satisfying 10 < a < 50 using this index, in terms of the number of records n1, retrieved and the height h of the tree? 2. what is the worst-case cost of finding records satisfying 10 < a < 50 and 5 < b < 10 using this index, in terms of the number of records n2 that satisfy this selection, as well as n1 and h defined above? 3. under what conditions on n1 and n2, would the index be an efficient way of finding records satisfying the condition from part (2)?
Answers: 1
question
Computers and Technology, 24.06.2019 10:50
In 2009 to 2010, how many social network users were reported as being victims of online abuse? a. 1 in 10 b. 100% c.1 in 100 d. 50%
Answers: 2
question
Computers and Technology, 24.06.2019 13:00
In a heat transfer course, we can derive the equation for the temperature distribution in a flat rectangular plate. in this example, we will look at a plate at steadystate with three sides being held at t1, and one side held at t2. the temperature for any location on the plate, t(x,y), can be calculated by where create a function (prob3_5) that will take inputs of vectors x and y in feet, scalar n, scalars l and w in feet and scalars t1 and t2 in degrees fahrenheit. it will output a matrix t which is the temperature of each x and y locations. t will have the number of columns equal to the number of elements in x and rows equal to the number of elements in y. though this can be done without loops (perhaps more efficiently), your program must use a nested loop.
Answers: 2
You know the right answer?
Write a for loop to print all elements in coursegrades, following each element with a space (includi...
Questions
question
Social Studies, 20.09.2021 04:00
question
Computers and Technology, 20.09.2021 04:00
question
Mathematics, 20.09.2021 04:00
question
Mathematics, 20.09.2021 04:00
question
Mathematics, 20.09.2021 04:00
question
Health, 20.09.2021 04:10
question
Social Studies, 20.09.2021 04:10
question
Business, 20.09.2021 04:10
Questions on the website: 13722363