1. Enter name, score, output level 80-100 excellent, 60-79 General, 0-59 continue efforts
while(true) {Console.Write ("Name:"); Console.ReadLine (); Console.Write ("Score:"); ints =int. Parse (Console.ReadLine ()); if(S >= the&& s <= -) {Console.WriteLine ("Excellent"); } if(S < the&& s >= -) {Console.WriteLine ("General"); } if(S < -&& s >=0) {Console.WriteLine ("keep trying ."); } }
2. Enter the three parameters of the one-dimensional two-time equation to determine whether the equation is real roots or not
while(true) {Console.WriteLine ("Please enter three parameters for the two-second equation"); Console.Write ("the value of a is:"); DoubleA =Double. Parse (Console.ReadLine ()); Console.Write ("The value of B is:"); Doubleb =Double. Parse (Console.ReadLine ()); Console.Write ("the value of C is:"); Doublec =Double. Parse (Console.ReadLine ()); Console.WriteLine ("confirm that the two-time equation of one dollar is"+ A +"*x^2+"+ B +"*x+"+ C +"=0"); DoubleD = b * B-4AC; if(A = =0) {Console.WriteLine ("This equation is not a unary two-time equation ."); } Else if(D >0) {Console.WriteLine ("This equation is a two-dimensional equation and has two unequal real roots"); } Else if(d = =0) {Console.WriteLine ("This equation is a unary two-time equation and has two equal real roots"); } Else{Console.WriteLine ("This equation is a unary two-time equation, but no real roots ."); } console.readline (); }
Output grade level && determine the root of a two-time equation