Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem 1: Write a program to fill ten integer numbers (e.g, 12,21, s6, 79, 65,

ID: 2291206 • Letter: P

Question

Problem 1: Write a program to fill ten integer numbers (e.g, 12,21, s6, 79, 65, 678, 321,654,871, 32) into an array and print out the maximum number. Problem 2: Write a program to search the array for the students' final scores based on their student ID. After finding the student's score, you need to output if the score is above 60, then print Pass or Fail. Also, in you program, you have to deal with the situation that you may not find the studentID int studentD [8] 1500, 501, 1505, 1406, 1408, 1309. 1520, 1525 float studentScores [8] 155.5, 81.0, 47.5, 92.0, 37.5, 85.0,83.5, 98.0

Explanation / Answer

problem1

#include <stdio.h>
int main()
{
int array1[10]={12,21,56,79,65,678,321,654,871,32};//entering 10 integer values
int i;
int largest_of_10;// greatest value will be stored here
largest_of_10 = array1[0];//assume intially first number array[0]= 12 is greater

for (i = 0; i <10; i++)
{
if (array1[i] > largest_of_10)
{
largest_of_10 = array1[i]; //larger is always is compared with next number
}
}

printf(" largest of 10 numbers is %d ", largest_of_10);
return 0;
}

output

largest of 10 numbers is 871