Develop a flow chart and write a c program to find the roots
of a quadratic equation ax2+bx+c=0 using switch and break
statement.
Answer / naveen kumar.gembali
#include<stdio.h>
#include<conio.h>
main()
{
float a,b,c,r1,r2,d;
printf("enter a,b,c values");
scanf("%f%f%f",&a,&b,&c);
d=b*b-4*a*c;
if(d>0)
{
printf("the roots are real and unequal");
r1=(-b-sqrtd)/2*a;
r2=(-b+sqrtd)/2*a;
printf("the roots are %f%f",r1,r2);
}
else
if(d=0)
{
printf("the roots are real and equal");
r1=-b/2*a;
r2=r1;
printf("the roots are %f%f",r1,r2);
}
elseif(d<0)
{
printf("the roots are imaginary");
}
getch();
}
@naveenkumar.gembali@
| Is This Answer Correct ? | 8 Yes | 13 No |
x=y=z=1 z=++x||++y&&++z Printf("%%%d";xyz) what is the values of x,y and z?????
Explain what a Binary Search Tree is.
How do you generate random numbers in C?
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
What is sparse file?
int i=~0; uint j=(uint)i; j++; printf(“%d”,j);
O,T,T,F,F,S,S,E,N,?,?,?,T,F,F,S,S,E,N
Differentiate b/w Modify and Update commands giving example.
In which layer of the network datastructure format change is done
1,4,8,13,21,30,36,45,54,63,73,?,?.
10 Answers AMB, Franklin Templeton,
what is function pointer?
What do you mean by scope of a variable in c?