Using C profram.( without using functions and pointers please) Write a program t
ID: 3579474 • Letter: U
Question
Using C profram.( without using functions and pointers please)
Write a program that reads form the user the grades of 10 students in an exam of 3 questions. lt stores the grades in a 2D array. Then it finds the following: 1. Display the 2D array of all grades along with the total of each student 2. The questions where the students have the worst and best totals. A sample output of the program is shown below: The class list ID Q1 Q2 Q3 Total 6.0 5.0 8.0 19.0 2.0 4.0 2.0 8.0 6.0 5.0 7.0 18.0 3.0 8.0 1.0 12.0 7.0 8.0 10.0 25.0 6 5.0 6.0 3.0 14.0 9.0 6.0 10.0 25.0 8 10.0 4.0 9.0 23.0 7.0 6.0 5.0 18.0 10 8.0 7.0 7.0 22.0 uestion 2 has best total uestion 1 has wort totalExplanation / Answer
#include<stdio.h>
#include<conio.h>
#include<math.h>
float distance(int, int, int, int);
void main()
initial purpose. ”);
scanf(“%d%d”,&x1,&y1);
printf(“Co-ordinate of 1st purpose is (%d, %d). ”,x1,y1);
printf(“Enter the Co-ordinates of second purpose. ”);
scanf(“%d%d”,&x2,&y2);
printf(“Co-ordinate of second purpose is (%d, %d). ”,x2,y2);
// The operate distance() is termed.
dist=distance(x1,y1,x2,y2);
printf(“The distance between 2 points is two units.”,dist);
getch();
}
float distance(int a1, int b1, int a2, int b2)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.