I have to code this in Matlab but a written out version work
Solution
roots_yourLastName.m
function [numOfRoots] = roots_yourLastName( a, b, c)
     discriminant = b*b - 4*a*c;
     if discriminant < 0
         numOfRoots = 0;
     elseif discriminant == 0
         numOfRoots = 1;
     else
         numOfRoots = 2;
     end
 end
rootsTest_yourLastName.m
function [] = rootsTest_yourLastName()
     a = input(\'Enter the A coefficient: \');
     b = input(\'Enter the B coefficient: \');
     c = input(\'Enter the C coefficient: \');
     numOfRoots = roots_yourLastName(a,b,c);
     fprintf(\'%d, %d, and %d coefficients have\',a,b,c);
     discriminant = b*b - 4*a*c;
     if numOfRoots==0
         fprintf(\' no real roots\ \');
     elseif numOfRoots==1
         fprintf(\' one real root:\ \');
         fprintf(\'\\tr=%.2f\ \', (-b*1.0)/2*a );
     else
         fprintf(\' two real roots:\ \');
         fprintf(\'\\tr1 = %.2f\ \',(-b+sqrt(discriminant)+0.0)/2*a);
         fprintf(\'\\tr2 = %.2f\ \',(-b-sqrt(discriminant)+0.0)/2*a);
     end
 end

