storing user input into an array and referring to the array c# -


This code works properly but there is no memory to store user input.

I also need to classify the grades in the array format in their respective columns, in which "S / N, category and calculation" occurs and how I do not know about it Any help Would be appreciated. Nomination test class {class YourExamScore {Private static string GetGrade (int examscore) {if (examscore> = 90 & amp; test scorecore & lt; = 100) Return "excessive Excellent"; Return "good" if (examscore & gt; = 70 & amp; Exam Scorecore & lt; = 89); If (examscore & gt; = 50 & amp; Exam Scorecore & lt; = 69) Return "Satisfactory"; If (examscore & gt; = 0 & amp; Exam Scorecore & lt; = 49) return "unsatisfactory"; Return "invalid"; } Fixed zero main (string [] args) {// Print a greeting message. After all, why not? Console WrightLine ("Welcome to the calculator exam!"); Console.light line ("input your exam score ..."); Console.light line ("press 2 when you input all points"); While (true) {var examscore = Convert.ToInt32 (console .readlines ()); If (examscore == -2) {break; } Var Grade = Getgraud (Examination); Console.WriteLine (grade); } Console.WriteLine ("\ n \ n Processing score ... please wait ..."); Console.ReadLine (); }}}}

OK it looks like homework, so I do not help

  1. If you know how many input you are going to use, then directly with the code,

    storage of points You can follow one side

    1. A fixed size array

      var markings = new int [10] ;

    2. Use, if not. Input is not determined, you can list & lt; Int & gt;

      var marks = new list ();


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -