Output grade level && determine the condition of the two-second equation root

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.