GDB online Debugger | Compiler - Code, Compile, Run, Debug online ... https://www.onlinegdb.
com/
You need to verify email to use all features of IDE. Follow instructio
OnlineGDB
beta (/) Run Debug Stop Share Save { } Beautify
online compiler and 3 #include <math.h>
main.c
debugger for c/c++ 4 int main()
5 {
Welcome, Mohd Ali 6 int a,b,c,d;
(/profile/) 7 float root1,root2;
(/notifications) 8 printf("\nenter values of a b c(coefficients) : ");
9 scanf("%d%d%d",&a,&b,&c);
6 10 d=b*b-4*a*c;
11 if(d==0)
Create New Project (/)
12 {
My Projects (/myfiles) 13 printf("\n roots are real and equal");
14 root1=-b/(2*a);
Classroom new
15 printf("\n roots of the equation are %f\t%f",root1,root1);
(/classroom) 16 }
Learn Programming 17 else if(d>0)
18 {
(https://learn.onlinegdb.com
19 printf("\n roots are real and distinct");
Programming 20 root1=-b-sqrt(d)/(2*a);
Questions 21 root2=-b+sqrt(d)/(2*a);
(https://question.onlinegdb.com
22 printf("\n roots of the equation are %f\t%f",root1,root2);
Logout (/logout) 23 }
24 else
25 printf("\nroots are imaginary");
26 return
27 0;
167K 28 }
input
About (/about) • FAQ
(/faq) • Blog (/blog/) •
Terms of Use
(/termsofuse) • Contact
Us (/contact) • GDB
Tutorial
(http://www.gdbtutorial.com/
• Credits (/credits) •
Privacy (/privacy)
© 2016 - 2022 GDB
Online
1 of 1 8/16/2022, 2:27 AM