Quadratic Equations Using If Else If in C In Hindi

C
Loading...

Quadratic Equations Using If Else If in C In Hindi – Aaj Ki Post Me Ham Quadratic Equations Program In C In Hindi Me Banane Wale Hai, Or Dekhne Wale Hai Ki Ye Program Kaise Kaam Karta Hai |

Quadratic Equations Program Ko Likhne Se Pahle Aapko Quadratic Equations Ko Understand Karna Hoga |

What is Quadratic Equations – In algebra, a quadratic equation (from the Latin quadratus for “square”) is any equation that can be rearranged in standard form as. where x represents an unknown, and a, b, and c represent known numbers, where a ≠ 0. If a = 0, then the equation is linear, not quadratic, as there is no. term.

Quadratic Equations Using If Else If in C In Hindi

Ham Is Program Me Root 1, Root 2 And Real & Imaginary Find Karne Wale Hai Jo Bhi Quadratic Equations Formula Ki Help Se |

Example:

#include <stdio.h>
#include <math.h>
#include<conio.h>
int main()
{
    float a, b, c, d, root1, root2, real, imag;
    printf("Enter coefficients a, b and c: ");
    scanf("%f%f%f",&a, &b, &c);
    d = b*b-4*a*c;
    
    if (d > 0)
    {
        root1 = (-b+sqrt(d))/(2*a);
        root2 = (-b-sqrt(d))/(2*a);
        printf("root1 = %.2f and root2 = %.2f",root1 , root2);
    }
    else if (d == 0)
    {
        root1 = root2 = -b/(2*a);
        printf("root1 = root2 = %.2f;", root1);
    }
    else
    {
        real = -b/(2*a);
        imag = sqrt(-d)/(2*a);
        printf("root1 = %.2f+%.2fi and root2 = %.2f-%.2fi", real, imag, real, imag);
    }
    getch();
}

Output:

Enter Coefficients a, b and c: 3 4 5
root1 = -0.67+1.11i and root2 = -0.67-1.11i

Friends Mujhe Umeed Hai, Aapko Ye Post + Program Ke Sath Me Samanjh Aa Gayi Hogi, Fir Agar Aapko Kuch Bhi Dikkat Hoti Hai, To Aap Niche Comments Box Me Likh Kar Aapni Problem Ka Solution Le Sakte Hai |

Leave a Reply

Your email address will not be published.