C Program to find roots of quadratic equation | C Programming tutorials

preview_player
Показать описание
Program to find roots of quadratic equation in c language.
so in this video, I have explained to you how to find roots, and cases according to discriminant value (d) and after that, I wrote a program for this problem using if else statement in vs code ide.
Don't skip the video first understand the mathematical concept and then jump into the program writing.

YOUR QUERIES -
1. how to find the roots of a quadratic equation
2. c program to find roots of a quadratic equation
3. if, else, else if statements
5. sqrt function in c programming

#cprogramming #programming #ctutorials

VISIT THE CHANNEL - VAIBHAV TALKS

IMP C PROGRAMS -

IMP C TOPICS -

C++ PRACTICE PROGRAMS

VS CODE TIPS AND TRICKS

IMP QUESTIONS RELATED TO COMPUTERS

⭐ SOCIAL MEDIA ⭐

• Instagram

Vaibhav Talks-

Vaibhav official-

Linkdin-

Sohope you liked the video.
Thank you for watching the video, have a nice day 🙌🏻👨‍💻
Рекомендации по теме
Комментарии
Автор

Thank you soo much sir 😭
I've an exam tmro..it really helped

fida
Автор

Thank you sir tomorrow i have an exam it will definitely help me

Anonymous_-
Автор

It's very and very helpful vedio
Thank you so much sir for this effort.❤❤
Your one lecture make our whole concept easier ❤❤❤
Best wishes for you

SadeemFatima-mn
Автор

U can copy from here
#include<stdio.h>
#include<math.h>
int main()
{
float a, b, c, d, r1, r2;

printf("Enter the value of a, b and c \n");
scanf("%f %f %f", &a, &b, &c);

d = b*b - 4 * a * c;

if ( d==0 ){
printf("Roots are real and equal\n");

r1= -b/(2*a);
r2= -b/(2*a);
printf("Root 1 is %f and Root 2 is %f\n", r1, r2);
}
else if (d>0){
printf("Roots are real and different\n");

r1 = (-b+sqrt(d))/(2*a);
r2 = (-b-sqrt(d))/(2*a);
printf("Root 1 is %f and Root 2 is %f\n", r1, r2);
}
else{
printf("Roots are imaginary\n");
}
return 0;
}

//Roots are real and different : 1 5 6
//Roots are imaginary : 1 5 7

thank me later

SMART_POOL
Автор

Bro mene a, b and c ki values input ki then run Kiya to sirf roots are imaginary show ho rha hey..
Root1 and root2 ki value nhi show ho rhi hey...

ayushxp
Автор

Sir aapne ye konsa software use kiya hai is video me

saini_
Автор

It was a great video, but sir can just try to talk more in English it will be very great

FredArchange
Автор

Sir agar imaginary roots print karane ho to?

prathamsinha
Автор

Mujhe bas quadratic equation ke roots chahiye the itna kyu bta diya 🥲

ConceptOfProgramming
Автор

Without using math.h ho sakte h ky????🤔

missbhatia..
Автор

Sir agar imaginary roots print karane ho to?

deepakbirje