My logic not working same in every problem in quardatic
@lokeshverma764,
https://ide.codingblocks.com/s/220388 Here is your corrected code.
I have commented the errors and added the correct statements.
Errors:
- // System.out.print("Enter coffecient of b = "); you donβt need to print such statements for input.
- If roots are real, print them in an increasing order.
- Use int instead of double. Since we have only integer in the sample output as well.
System.out.print("Enter coffecient of b = ")
my these statement create any error ?
@lokeshverma764,
This statement is not required. When submitting the code, you have to follow the exact pattern given in the question and sample test case.
Do not print any statement like this "System.out.print("Enter coffecient of b = β)β while taking input. Since in the question it is mentioned that input values are in the order a b c.
1 Like