Question
Convert to C++ import java.io.*; import java.text.NumberFormat; // for number formatting public class ClassAverageBR { public static void main(String[] args) throws IOException { //declare and
Convert to C++
import java.io.*; import java.text.NumberFormat; // for number formatting public class ClassAverageBR { public static void main(String[] args) throws IOException { //declare and initialize variables int score; int sumOfScoresByStudent = 0; int sumOfAllScores = 0; double classAverage; BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in)); String studentName; String scoreStr; String studentNameMessage = "Enter the name of the student:"; String numOfStudentStr = "Enter the number of students: "; String numOfScoresStr = "Enter the number of scores to be entered per student: "; String outputTable = "Names, scores, average scores, and letter grades: "; NumberFormat numFormatter = NumberFormat.getNumberInstance(); numFormatter.setMinimumFractionDigits(1); numFormatter.setMaximumFractionDigits(1); //get input from user System.out.println(numOfStudentStr); int numOfStudents = Integer.parseInt(dataIn.readLine()); System.out.println(numOfScoresStr); int numOfScores = Integer.parseInt(dataIn.readLine()); //declare arrays int[][] scores = new int[numOfStudents][numOfScores]; String[] students = new String[numOfStudents]; double[] avgScores = new double[numOfStudents]; char[] letterGrades = new char[numOfStudents]; //get more user input, load arrays, and process data for (int i = 0; i There are 3 Steps involved in it See step-by-step solutions with expert insights and AI powered tools for academic successStep by Step Solution
Step: 1
Get Instant Access to Expert-Tailored Solutions
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