Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Reset to Starter Code 1 points possible 2 - ) { 2. Q2: Print Array saved Wrne a program that reads 5 integers from standard
Reset to Starter Code 1 points possible 2 - ) { 2. Q2: Print Array saved Wrne a program that reads 5 integers from standard in, and write either and for an odd or an for an even number with each character on its own ine You can calc as many functions as you like. However no single function including main can have more than 3 semicolons in if you violate this rule you will receive a zero on this assignment Example input 6 10 3 3 9 Correct Output E E E o o This is a difficult problem that you may want to solve last code.co New Full Screen Grading include int main() 4 001: Example int arr_length; 0/0 pes-Cikk forces 6 printf("enter the number of elements : "); scanf("%d", arr_length); 002: Another int arr[arr_length]; 0/Ops-ack printf("enter xd numbers : ", arr length); 10 for(int i ;i arr_length; i++){ 002: Hidden 11 scanf("%d", arr[i]); 0/1pisix or deals 12 1 13 (int i @;i arr_length; i ) 14 15 printf(""); 16 } 17 els 18 printf("0"); " 19 } 20 printf(" "); 0 her FAILED FAILED FAILED 3. Q3: Running Average saved 1 points possible Reset to Starter Code im studying temperatures over venous time scales. Unfortunately, my thermometer isn't very precise, so I need to average its readings together to level out the Spikes I need you to write a program to generate a running average of my temperature data The first integer input is the number of data points (guaranteed to be less than 10001 The next linteger) is the number of data points to be averaging together The rest of the input are whitespace separated floats. Please output the running average with one point of precision, each on their own line. Exemple Inout 104 2793172956 357 38.5 415506 48.6557604 Correct Output: 312 33.9 36 3 416 448 491 53.8 You need to use functions to solve the problem. Ive written the main function and I call two functions that you will need to define, fi_array and calculate_average. You need to define the functions at the location indicated. You may not alter the main function in any way, doing so will result in a zera on this assignment. For safety, here's a copy of the starter code #include // Define 1111_array and calculatet_veringe here. int main(void) fleet values[10001: and number of values, average length; scanf("d", Snumber_of_values, average_length); fill_array(values, number_of_values): for (int start_index = 0; start_index 2 3 // Define fill_array and calculate_average here. 4 5 6 int main(void) { 7 float values[1000); 8 int number_of_values, average_length; 9 scanf("%d %d", &number_of_values, average_length); 10 11 fill_array(values, number_of_values); 12 13 14 for (int start_index 0; start_index
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started