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

ansver
Answers: 2

Another question on Business

question
Business, 22.06.2019 01:30
Eliminating entries (including goodwill impairment) and worksheets for various years on january 1, 2013, porter company purchased an 80% interest in the capital stock of salem company for$850,000. at that time, salem company had capital stock of $550,000 and retained earnings of $80,000.differences between the fair value and the book value of the identifiable assets of salem company were asfollows: fair value in excess of book valueequipment$130,000land65,000inventory40,000the book values of all other assets and liabilities of salem company were equal to their fair values onjanuary 1, 2013. the equipment had a remaining life of five years on january 1, 2013. the inventory was sold in2013.salem company’s net income and dividends declared in 2013 and 2014 were as follows: year 2013 net income of $100,000; dividends declared of $25,000year 2014 net income of $110,000; dividends declared of $35,000required: a.prepare a computation and allocation schedule for the difference between book value of equity acquired andthe value implied by the purchase price.b.present the eliminating/adjusting entries needed on the consolidated worksheet for the year endeddecember 31, 2013. (it is not necessary to prepare the worksheet.)lo6lo1
Answers: 1
question
Business, 22.06.2019 03:00
1) u.s. real gdp is substantially higher today than it was 60 years ago. what does this tell us, and what does it not tell us, about the well-being of u.s. residents? what are the limitations of the gdp as a measure of economic well-being? given the limitations, why is gdp usually regarded as the best single measure of a society’s economic well-being? 2) what is an intermediate good? how does an intermediate good differ from a final good? explain why it is the case that the value of intermediate goods produced and sold during the year is not included directly as part of gdp, but the value of intermediate goods produced and not sold is included directly as part of gdp.
Answers: 2
question
Business, 22.06.2019 10:30
The card shoppe needs to maintain 21 percent of its sales in net working capital. currently, the store is considering a four-year project that will increase sales from its current level of $349,000 to $408,000 the first year and to $414,000 a year for the following three years of the project. what amount should be included in the project analysis for net working capital in year 4 of the project?
Answers: 3
question
Business, 22.06.2019 20:20
Amanager of a store that sells and installs spas wants to prepare a forecast for january and june of next year. her forecasts are a combination of trend and seasonality. she uses the following equation to estimate the trend component of monthly demand: ft = 30+5t, where t = 1 in january of this year. seasonal relatives are 0.60 for january and 1.50 for june. what demands should she predict for january and june of next year
Answers: 2
You know the right answer?
Set nummatches to the number of elements in uservalues (having num_vals elements) that equal matchva...
Questions
question
Mathematics, 01.03.2021 18:50
question
Mathematics, 01.03.2021 18:50
question
Mathematics, 01.03.2021 18:50
question
English, 01.03.2021 18:50
question
Mathematics, 01.03.2021 18:50
question
World Languages, 01.03.2021 18:50
Questions on the website: 13722362