0% found this document useful (0 votes)
28 views

ICT Assignment

1. The document lists 6 group members for an ICT assignment: Yeabsiera Bekele, Saron Aschalew, Erloie Gezaghen, Arsema Habtamu, Bethlem Adis, and Eyerus Chemir. 2. It describes an algorithm to determine the roots of a quadratic equation by calculating the discriminant and using conditional statements to check if the roots are real, real and equal, or imaginary. 3. The algorithm accepts coefficients a, b, and c as input, calculates the discriminant, and uses the sign of the discriminant to determine the nature and values of the roots, which it then displays as output.

Uploaded by

solyana tesfaye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

ICT Assignment

1. The document lists 6 group members for an ICT assignment: Yeabsiera Bekele, Saron Aschalew, Erloie Gezaghen, Arsema Habtamu, Bethlem Adis, and Eyerus Chemir. 2. It describes an algorithm to determine the roots of a quadratic equation by calculating the discriminant and using conditional statements to check if the roots are real, real and equal, or imaginary. 3. The algorithm accepts coefficients a, b, and c as input, calculates the discriminant, and uses the sign of the discriminant to determine the nature and values of the roots, which it then displays as output.

Uploaded by

solyana tesfaye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

ICT Assignment

Group members

1 .Yeabsiera Bekele

2. Saron Aschalew

3. Erloie Gezaghen

4. Arsema Habtamu

5. Bethlem Adis

6. Eyerus Chemir

Summation date: 11/04/22

Summited to: Mr. Tibebe


2.Algorithm

1. Start
2. Accept and read the coefficients of the equation, a, b and c.
3. Calculate discriminant = (b * b) – (4 * a * c)
4. If discriminant > 0:
4.1: Calculate root1 = ( -b + sqrt(discriminant)) / (2 * a)
4.2: Calculate root2 = ( -b - sqrt(discriminant)) / (2 * a)
4.3: Display “Roots are real and different”
4.4: Display root1 and root2
5: Else if discriminant = 0:
5.1: Calculate root1 = -b / (2 *a)
5.2: root2 = root1
5.3: Display “Root are real and equal”
5.4: Display root1 and root2
6. Else:
6.1: Calculate real = -b / (2 * a)
6.2:Calculate imaginary = square(-discriminant) / (2 * a)
6.3: Display “Roots are imaginary”
6.4: Display real, “±” , imaginary, “i”
7. End.
Start

Accept and read a,b,c

Discrminat=(b*b)-(4*a*c)=

Discrimi
no Discrim no
nant>0c
inant=0
Real = -b/(2*a)
=0

yes yes Imaginary= square of(-


Rroot1=(-b-square root discrimant)/(2*a)
Root1= -b/(2*a)
of discriminant)/(2*a)
Display “roots are
imaginary”

Root2=(-b- sqr root of Root1=root2


discrminat)/(2*a) Display real “+”

Display “roots are real and Display imaginary “i”


Display “roots are real equal”
and different”
Display real”-“
Display root 1. Root2 Display rooot1.root2 Display imaginary “i”

3. Algorithm

END
1. Start
2. Accept a,b,c
3. If (a>b) and (a>c) then print “A is greater.”
Else if(b>a) and(b>c) then print “B is greater.”
Else print “c is greatwe.”
4. stop.

Start

Accpet a,b,c

no yes
If a>b

If b>c no no If a>c

yes yes
Display c
Display b Display a

End

8. Algorithm
1. Start
2.accept a,b
3. print a,b
4. a=a=b
5. b=a-b
6.a=a-b
7. display a,b
8.end

Start

Accept a,b

A=a+b
B=a-b
a=a-b

Print a,b

End
11. Algorithm

1. Start
2. Accept number
3. Divide the number by 2 and store the reminder in R
4. If R=0
5. Display “Number is odd.”
6. If not display “Number is even.”
7 end

Start

Accept number

If number
% 2= 0
yes no

Display “Number is Display “ Number is


even” odd”

End
15. Algorithm

start

jnkl
mnm

knkm
bjknl
nknk

You might also like