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 mainString args throws IOException
declare and initialize variables
int score;
int sumOfScoresByStudent ;
int sumOfAllScores ;
double classAverage;
BufferedReader dataIn new BufferedReadernew InputStreamReaderSystemin;
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.printlnnumOfStudentStr;
int numOfStudents Integer.parseIntdataInreadLine;
System.out.printlnnumOfScoresStr;
int numOfScores Integer.parseIntdataInreadLine;
declare arrays
int scores new intnumOfStudentsnumOfScores;
String students new StringnumOfStudents;
double avgScores new doublenumOfStudents;
char letterGrades new charnumOfStudents;
get more user input, load arrays, and process data
for int i ; i
theGrade A;
else if averageScore
theGrade B;
else if averageScore
theGrade C;
else if averageScore
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
