#include<string>
using namespace std;
void main()
{
int number_students;
string name[30];
int scores[30],highest,index=0;
double average;
//inputting students name
cout<<"Enter number of students:";
cin>>number_students;
int sum=0;
for(int i=0;i<number_students;i++)
{
cout<<"Enter student name"<<i+1<<":";
cin>>name[i];
cout<<"Enter score:";
cin>>scores[i];
sum+=scores[i];
}
highest=scores[0];
for(int i=1;i<number_students;i++)
{
if(highest<scores[i])
{highest=scores[i];
index=i;
}
}
average=static_cast<double>(sum/number_students);
cout<<"Student with highest score is:"<<name[i]<<endl;
cout<<"Average score:"<<average<<endl;
cout<<"Difference b/w highest and averege:"<<highest-average<<endl;
system("pause");
}//end main
In Python:Write a program that prompts the user to enter the number of students and each student’s name and score, and finally displays the student with the highest score and the student with the second-highest score. Assume that the number of students is at least 2.
CIS 22A C++ Project Exam Statistics Here is what your program will do: first it welcomes the user and displays the purpose of the program. It then prompts the user to enter the name of an input file (such as scores.txt). Assume the file contains the scores of the final exams; each score is preceded by a 5 characters student id. Create the input file: copy and paste the following data into a new text file named scores.txt DH232 89...
In this assignment, you will write a program in C++ which uses files and nested loops to create a file from the quiz grades entered by the user, then reads the grades from the file and calculates each student’s average grade and the average quiz grade for the class. Each student takes 6 quizzes (unknown number of students). Use a nested loop to write each student’s quiz grades to a file. Then read the data from the file in order...
[JAVA/chapter 7] Assignment: Write a program to process scores for a set of students. Arrays and methods must be used for this program. Process: •Read the number of students in a class. Make sure that the user enters 1 or more students. •Create an array with the number of students entered by the user. •Then, read the name and the test score for each student. •Calculate the best or highest score. •Then, Calculate letter grades based on the following criteria:...
Please answer all the questions and I don't want work for another person. do it in jaf project. 5.6 (Conversion from m to kilometers) Write a program that displays the following two tables side by side: Miles Miles Kilometers Kilometers 1.609 20 12.430 15.538 3.218 25 37.290 14.481 60 I 65 40.398 10 16.090 5.8 (Find the highest score) Write a program that prompts the user to enter the number of students and each student's name and score, and finally...
Java Program: In this project, you will write a program called GradeCalculator that will calculate the grading statistics of a desired number of students. Your program should start out by prompting the user to enter the number of students in the classroom and the number of exam scores. Your program then prompts for each student’s name and the scores for each exam. The exam scores should be entered as a sequence of numbers separated by blank space. Your program will...
Small Basic Programming Question: Average Score- Write a program that uses loop to collect data and calculate the average score over a number of tests for a number of students. The program should: 1. first ask the user to enter the number of students in the range of 1 to 10. 2. then the program asks the user to enter the number of tests (in the range of 1 to 5) 3. Then use a loop to collect the scores...
Small Basic Programming Question: Average score Write a program that uses loops to collect data and calculate the average score over a number of tests for a number of students. The program should : 1. first ask the user to enter the number of students in the range of 1 to 10. 2. then the program asks the user to enter the number of tests (in the range of 1 to 5) 3. Then use a loop to collect the...
Create a C++ program to calculate grades as well as descriptive statistics for a set of test scores. The test scores can be entered via a user prompt or through an external file. For each student, you need to provide a student name (string) and a test score (float). The program will do the followings: Assign a grade (A, B, C, D, or F) based on a student’s test score. Display the grade roster as shown below: Name Test Score ...
USE PYTHON 3Write a program that prompts the user to enter the number of students and each student's score, and displays the highest and second- highest scores.