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 15:10
David is in week 3 of his current ashford course and has a paper due by monday night at midnight. he has finished everything but the concluding paragraph. as he boots up his computer to work on it, he sees a flash across the screen and then the screen goes black. he begins to panic as he tries desperately to turn the laptop back on. david should have saved his work on what kind of portable device?
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
Which of the following would you find on a network
Answers: 3
question
Computers and Technology, 24.06.2019 07:00
You are most likely to automatically encode information about
Answers: 1
question
Computers and Technology, 24.06.2019 10:20
Write a program that keeps asking the user for new values to be added to a list until the user enters 'exit' ('exit' should not be added to the list). these values entered by the user are added to a list we call 'initial_list'. then write a function that takes this initial_list as input and returns another list with 3 copies of every value in the initial_list. finally, inside print out all of the values in the new list. for example: input: enter value to be added to list: a enter value to be added to list: b enter value to be added to list: c enter value to be added to list: exit output: a b c a b c a b c note how 'exit' is not added to the list. also, your program needs to be able to handle any variation of 'exit' such as 'exit', 'exit' etc. and treat them all as 'exit'.
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
Mathematics, 28.06.2019 22:00
question
Biology, 28.06.2019 22:00
Questions on the website: 13722363