Question: how to do this question on maple program with all answers

pithe eight digits of your student Id number are used to individualise the questions. they are labelled a1a2a3a4a5a6a7a8a.. all non interger outputs should be to 3 decimal places. question 1_ depending of your own value of a8, write a program that performs the calculation below:

a8                           calculation required

0,1 or 2                    output the volume of a sphere , given input the radius r.apply it to input r=a5.a6a7a8m.

3,4or5                    output the volume of sphere based pyramid with height m, given input base sidelengh b.apply  it to input b=a5.a6a7a8m.

6,7,8 or 9               output the area of a regular hexagon, given input the sidelength s. apply it to input s= x a5.a6a7a8m

 

question 2

 output all real roots of the quadratic equation ax^2+bx+c=0, given inputs a,b and c. apply it to the following three cases:

a                                                                      b                                                                  c

a6+1                                                            a7+1                                                           -a8-1

1                                                                  2(a8+1)                                                        (a8+1)^2

a6+1                                                             a7+1                                                                (a7+1)^2

if there is not roots, your program should report this fact

 

thank you

Please Wait...