Write a C program to find the roots of a quadratic equation.
#include<stdio.h> #include<conio.h> #include<math.h> void main() { float a,b,c,d,r1,r2,imp,rp; clrscr(); printf(“Enter a,b,c:”); scanf(“%f%f%f”,&a,&b,&c); d=b*b-4.0*a*c; if(d==0) { printf(“roots are real and equal”); r1=-b/2*a; r2=r1; printf(“root1=%f”,r1); printf(“root2=%f”,r2); } else if(d>0) { printf(“roots are real and unequal”); r1=(-b+sqrt(d))/2*a; r2=(-b-sqrt(d))/2*a; printf(“root1=%f”,r1); printf(“root2=%f”,r2); } else if(d<0) { d=-d; printf(“roots are complex”); rp=-b/2*a; imp=sqrt(d)/2*a; printf(“root1=%f+i%f”,rp,imp); printf(“root2=%f-i%f”,rp,imp); } getch(); }
Write a C-Program That Uses Functions To Insert A Sub-String In To A Given Main String From A Given Position.
Write a C program to print the following output.
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Write a C program to calculate the following sum:
Sum = 1-x^2/2!+x^4/4!-x^6/6!+x^8/8!-x^10/10!
Describe Dimension of Software Quality
Write a C program to find the value of Sine(X).
Write a C program to find the multiplication table of any no.