Business, 16.03.2020 16:45 jlegrand9098
Set nummatches to the number of elements in uservalues (having num_vals elements) that equal matchvalue. ex: if matchvalue = 2 and uservals = {2, 2, 1, 2}, then nummatches = 3.#include int main(void) {const int num_vals = 4; int uservalues[num_vals]; int i = 0; int matchvalue = 0; int nummatches = -99; // set nummatches to 0 before your for loopuservalues[0] = 2; uservalues[1] = 2; uservalues[2] = 1; uservalues[3] = 2; matchvalue = 2; /* your solution goes here */printf("matchvalue: %d, nummatches: %d\n", matchvalue, nummatches); return 0; }2)write a for loop to populate array userguesses with num_guesses integers. read integers using scanf. ex: if num_guesses is 3 and user enters 9 5 2, then userguesses is {9, 5, 2}.#include int main(void) {const int num_guesses = 3; int userguesses[num_guesses]; int i = 0; /* your solution goes here */return 0; }3)array testgrades contains num_vals test scores. write a for loop that sets sumextra to the total extra credit received. full credit is 100, so anything over 100 is extra credit. ex: if testgrades = {101, 83, 107, 90}, then sumextra = 8, because 1 + 0 + 7 + 0 is 8.#include int main(void) {const int num_vals = 4; int testgrades[num_vals]; int i = 0; int sumextra = -; // initialize to 0 before your for looptestgrades[0] = 101; testgrades[1] = 83; testgrades[2] = 107; testgrades[3] = 90; /* your solution goes here */printf("sumextra: %d\n", sumextra); return 0; }4)write a for loop to print all num_vals elements of array hourlytemp. separate elements with a comma and space. ex: if hourlytemp = {90, 92, 94, 95}, print: 90, 92, 94, 95note that the last element is not followed by a comma, space, or newline.#include int main(void) {const int num_vals = 4; int hourlytemp[num_vals]; int i = 0; hourlytemp[0] = 90; hourlytemp[1] = 92; hourlytemp[2] = 94; hourlytemp[3] = 95; /* your solution goes here */printf("\n"); return 0; }
Answers: 2
Business, 22.06.2019 20:20
Faldo corp sells on terms that allow customers 45 days to pay for merchandise. its sales last year were $325,000, and its year-end receivables were $60,000. if its dso is less than the 45-day credit period, then customers are paying on time. otherwise, they are paying late. by how much are customers paying early or late? base your answer on this equation: dso - credit period = days early or late, and use a 365-day year when calculating the dso. a positive answer indicates late payments, while a negative answer indicates early payments.a. 21.27b. 22.38c. 23.50d. 24.68e. 25.91b
Answers: 2
Business, 22.06.2019 22:10
Which of the following tends to result in a decrease in the selling price of houses in an area? a. an increase in the population of the city or town. b. an increase in the labor costs of construction. c. an increase in the income of new residents in the city or town. d. an increase in mortgage interest rates.
Answers: 1
Business, 23.06.2019 08:20
Analyze the forces in the marketing environment that have contributed to pinterest’s explosion in popularity?
Answers: 3
Set nummatches to the number of elements in uservalues (having num_vals elements) that equal matchva...
Mathematics, 29.01.2021 20:10
Mathematics, 29.01.2021 20:10
Spanish, 29.01.2021 20:10
Social Studies, 29.01.2021 20:10
History, 29.01.2021 20:10
Mathematics, 29.01.2021 20:10
Mathematics, 29.01.2021 20:10
English, 29.01.2021 20:10
Chemistry, 29.01.2021 20:10
Arts, 29.01.2021 20:10