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(); }
Discuss the ACID properties of transaction.
Write a C program to find the multiplication table of any no.
Describe structured analysis and structured design.
Write the recursive algorithm to find x^ n.