Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Open a new file and save as lab12ex2.c. Modify your code in Section 11.1 (lab12ex1.c) to find the maximum value of the number in the

image text in transcribedimage text in transcribed

Open a new file and save as lab12ex2.c. Modify your code in Section 11.1 (lab12ex1.c) to find the maximum value of the number in the array: A={10, 34, 67, 31, 73, 27, 100, 94} and print the number out. Hint #1: Your code should be able to identify 100 as the maximum number. Hint #2: You must use if/else in the for-loop 1 Lecture 9Arrays/ 2 Lab12ext/ 3 /*Example 1. calculate Averages/ 4 5 #include 6 #define NSIZE 8 7 8 int matno 9 int t; 10 double sun=, avg. 11 12 double A[NSIZE]={10, 34, 67, 31, 73, 27. 108, 94}; 13 14 for(t=0;t NSIZE, t++){ 15 sum - sum + A[2]; /*sw each value to array/ 16 ) 17 Calculate average/ 19 avg = sum/NSIZE, 20 21 printf("Average = %F ". avg). 22 23 return; 24 } 18

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Successful Keyword Searching Initiating Research On Popular Topics Using Electronic Databases

Authors: Randall MacDonald, Susan MacDonald

1st Edition

0313306761, 978-0313306761

More Books

Students also viewed these Databases questions