Question: convert to c# from java buffered reader import java.io . * ; import java.text.DecimalFormat; / / for decimal formatting public class ClassAverageBR { public static

convert to c# from java buffered reader
import java.io.*;
import java.text.DecimalFormat; // for decimal 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:
";
DecimalFormat fmtDecimal = new DecimalFormat("###.##");
//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=90)
theGrade ='A';
else if (averageScore >=80)
theGrade ='B';
else if (averageScore >=70)
theGrade ='C';
else if (averageScore >=60)
theGrade ='D';
else
theGrade ='F';
return theGrade;
}// end findGrade
}// end class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!