-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.txt
More file actions
42 lines (35 loc) · 714 Bytes
/
Copy pathexample.txt
File metadata and controls
42 lines (35 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//comment
function idFunction(){
print();
read();
for(double i=0; i<5; i++){
if(a!=b)
if(a>b)
if(b<a)
if(b/a)
while(b==a)
}
}
main()
{
double a, b, c, discriminant, root1, root2, realPart, imaginaryPart;
print();
discriminant = b*b-4*a*c;
if (discriminant > 0)
{
root1 = (-b+sqrt(discriminant))/(2*a);
root2 = (-b-sqrt(discriminant))/(2*a);
print(root1 , root2);
}
else if (discriminant == 0)
{
root1 = root2 = -b/(2*a);
print(root1);
}
else
{
realPart = -b/(2*a);
imaginaryPart = sqrt(-discriminant)/(2*a);
}
return 0;
}