//Steve Young, Bryant Villasana, Daniel Gonzalez //Computer Programming 3 //Date: Next 15 days //Program: Final Program #include #include #include #include #include #include #include #include #include #include #include #include #include int choice, score, x; float score2; int driver = VGA; int mode = VGAHI; char ans[2]; void sound(); void grade(); void title(); void algebranotes(); void algebra1(); void algebra2(); void geometrynotes(); void geometry(); void precalnotes(); void precal(); void sound() {for(x = 3000; x >= 500; x=x-1000) {sound(x); delay(50); nosound();}} void grade() { float denom = 20; if(choice == 3){denom = 15;} clrscr(); cout<<"You have finished the test!!!"<>choice; switch(choice) { case 1: algebranotes(); break; case 2: algebra1(); break; case 3: algebra2(); break; case 4: geometrynotes(); break; case 5: geometry(); break; case 6: precalnotes(); break; case 7: precal(); break; case 8: break; default: title(); break; } } void algebranotes() { cout<<" Algebra I and II Formulas "<0,up p<0, down p>0,right p<0,left"<0,up p<0, down p>0,right p<0,left"<0 and AØC"<>ans; if(strcmp(ans,"c")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"a")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"b")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"e")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"c")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"d")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"e")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"b")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"a")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"e")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"b")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"e")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"c")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"b")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"c")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"a")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"e")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"a")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"d")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if(strcmp(ans,"d")==0) { cout<<"That is correct!!! Good Job!!"<>ans; if (strcmp(ans,"b")==0) {cout<<"That is correct!!! Good Job!!"<>ans; if (strcmp(ans,"d")==0) {cout<<"That is correct!!! Good Job!!"<>ans; if (strcmp(ans,"c")==0) {cout<<"That is correct!!! Good Job!!"<>ans; if (strcmp(ans,"a")==0) {cout<<"That is correct!!! Good job!!"<>ans; if (strcmp(ans,"c")==0) {cout<<"That is correct!!! Good Job!!"<>ans; if (strcmp(ans,"a")==0) {cout<<"This is correct!!! Good Job!!"<>ans; if (strcmp(ans,"b")==0) {cout<<"This is correct!!! Good Job!!"<>ans; if (strcmp(ans,"a")==0) {cout<<"This is correct!!! Good Job!!"<>ans; if (strcmp(ans,"c")==0) {cout<<"This is correct!!! Good Job!!"<>ans; if (strcmp(ans,"b")==0) {cout<<"This is correct!!! Good Job!!"<>ans; if (strcmp(ans,"d")==0) {cout<<"This is correct!!! Good Job!!"<>ans; if (strcmp(ans,"a")==0) {cout<<"This is correct!!! Good Job!!"<>ans; if (strcmp(ans,"a")==0) {cout<<"This is correct!!! Good Job!!"<>ans; if (strcmp(ans,"b")==0) {cout<<"This is correct!!! Good Job!!"<>ans; if (strcmp(ans,"b")==0) {cout<<"This is correct!!! Good Job!!"< "< "<"); outtextxy(128,35,"secant"); line(90,70,210,70); outtextxy(125,55,"diameter"); line(150,70,150,130); settextstyle(SMALL_FONT, VERT_DIR, 5); outtextxy(135,70,"radius"); line(95,130,265,130); settextstyle(SMALL_FONT, HORIZ_DIR, 5); outtextxy(90,122,"< >"); outtextxy(210,115,"tangent"); circle(450,70,60); setfillstyle(EMPTY_FILL,1); pieslice(450,70,10,50,60); outtextxy(465,15,"A"); outtextxy(500,60,"B"); outtextxy(440,65,"C"); outtextxy(500,20,"minor arc"); outtextxy(315,60,"major arc"); outtextxy(390,130,"central angle C = measure of AB"); outtextxy(0,150,"In a circle: if a diameter is Á to a chord, then is bisects the chord and its arc."); outtextxy(0,165," two minor arcs are congruent only if their chords are too."); outtextxy(0,180," two chords are congruent only if they are equidistant from the center."); outtextxy(0,195,"An INSCRIBED ANGLE is an angle whose vertex is on the circle and whose"); outtextxy(0,210," sides are chords od the circle. If an angle is inscribed, the measure of the angle"); outtextxy(0,225," equals « the measure of its intercepted arc. If an angle is inscribed in a "); outtextxy(0,240," semicirle, then the angle is a right angle. If a quadrilateral is inscribed in a "); outtextxy(0,255," circle, then its opposite angles are supplementary."); outtextxy(0,270,"A TANGENT line intersects the circle at exactly one point. If a line is tangent to a"); outtextxy(0,285," circle, then it is Á to the radius drawn to the point of tangency. If two segments "); outtextxy(0,300," from the same exterior point are tangent to a circle,then thay are congruent."); outtextxy(0,315,"If a secant and a tangent intersect at the point of tangency, then the measure of "); outtextxy(0,330,"each angle formed is « the measure of its intercepted arc. If two secants, a secant"); outtextxy(0,345,"and a tangent, or two tangents intersect in the exterior of a circle, then the "); outtextxy(0,360,"measure of the angle formed is « the positive difference of the measure of its "); outtextxy(0,375,"intercepted arcs. If two chords intercect in a circle, then the product of the "); outtextxy(0,390,"measures of the segments of the chords are equal(cross multiply). If two secant"); outtextxy(0,405,"segments intersect at an exterior point, the the product of the measures of one"); outtextxy(0,420,"secant and its chord is equal to the product of the other. If a tangent and a secant"); outtextxy(0,435,"intersect at an exterior point, then the square of the measure of the tangent is "); outtextxy(0,450,"equal to the product of the secant and its chord."); outtextxy(0,465,"Press any key to continue..."); getch(); floodfill(0,0,1); outtextxy(0, 0,"A POLYGON is a plane figure formed by a finite number of segments such that each "); outtextxy(0, 15," side intersects exactly two other sides and sides that have a common endpoit are "); outtextxy(0, 30," noncollinear.A CONVEX polygon is one such that no line containing a side of the "); outtextxy(0, 45," polygon contains a point in the interior of itself. Convex polygons with all sides"); outtextxy(0, 60," and angles congruent are called REGULAR. Polygons are two-dimensional, the "); outtextxy(0, 75," corresponding three-dimensional figures are POLYHEDRA. They are made up of polygon"); outtextxy(0, 90," -shaped regions called FACES. Segments where faces intersect are called EDGES. "); outtextxy(0,105," Points where 3 or more edges intersect are called VERTICES. A convex polyhedron "); outtextxy(0,120," with congruent, regular faces is a REGULAR polyhedron."); outtextxy(0,135,"If a convex polygon has n sides and S is the sum of the measures of its interior "); outtextxy(0,150," angles, then S = 180(n - 2). If a polygon is convex, then the sum of the measures"); outtextxy(0,165," of the extrior angles is 360."); outtextxy(0,180,"AREA: b = base h = height d = diagonal P = perimeter a = apothem "); outtextxy(0,195," Rectangle/Parallelogram: A = bh Triangle: A = «bh"); outtextxy(0,210," Trapezoid: A = «h(b1 + b2) Rhombus: A = «d1d2"); outtextxy(0,225," Regular Polygon: A = «Pa (apothem - segment drawn from center of"); outtextxy(0,240," Circle: A = ãrý the polygon and Á to a side)"); outtextxy(0,255,"Circumference(perimeter of a circle): C = 2ãr r = radius"); outtextxy(0,270,"The SURFACE AREA of a polyhedron, or SOLID, is the sum of the areas of its faces. "); outtextxy(0,285," PRISMS are solids with congruent polygonal bases in parallel planes. CYLINDERS "); outtextxy(0,300," have congruent and parallel circular bases. An ALTITUDE is a Á segment joining "); outtextxy(0,315," the plains of the bases. The length of the altitude it the HEIGHT of the figure. "); outtextxy(0,330,"All faces of a PYRAMID, save the base, intersect the VERTEX. A REGULAR PYRAMID has"); outtextxy(0,345," a regular polygonal base, whose center lies Á to the vertex. All lateral faces of"); outtextxy(0,360," a regular pyramid are congruent isosceles triangles,the height of which is called"); outtextxy(0,375," the SLANT HEIGHT(l). The TOTAL SURFACE AREA of a pyramid or cone is: T = «Pl + B,"); outtextxy(0,390," where B is the area of the base. Total surface area of a SPHERE is: T = 4ãrý. "); outtextxy(0,405,"VOLUME: B = area of base h = height r = radius "); outtextxy(0,420," Solid: V = Bh Cylinder: V = ãrýh. "); outtextxy(0,435," Pyramid: V = (1/3)Bh Cone: V = (1/3)Bh "); outtextxy(0,450," Sphere: V = (4/3)ãrý"); outtextxy(0,465,"Press any key to continue..."); getch(); closegraph(); title(); } void geometry() { initgraph(&driver, &mode, "\\TC\\BGI"); settextstyle(SMALL_FONT,HORIZ_DIR,6); setfillstyle(SOLID_FILL,0); floodfill(0,0,1); outtextxy(0,0,"1. Give A(-5,-3), B(-3,-3), C(1,1), D(-1,1). ABCD is a"); outtextxy(10,20,"a Line"); outtextxy(10,40,"b Circle"); outtextxy(10,60,"c Square"); outtextxy(10,80,"d Parallelgram"); gotoxy(1,8); cin>>ans; if(strcmp(ans,"d")==0){sound(); score++;} floodfill(0,0,1); rectangle(350,100,550,200); outtextxy(445,150,"R"); outtextxy(0,0,"2. If à1 = 26, find à3."); outtextxy(10,20,"a 26"); line(350,100,550,200); outtextxy(340,80,"N"); outtextxy(10,40,"b 46"); line(550,100,350,200); outtextxy(340,200,"Q"); outtextxy(10,60,"c 64"); outtextxy(560,80,"O"); outtextxy(560,200,"P"); outtextxy(10,80,"d 90"); outtextxy(540,110,"4");outtextxy(540,170,"3"); gotoxy(1,8); outtextxy(385,180,"1");outtextxy(510,180,"2"); cin>>ans; if(strcmp(ans,"c")==0){sound(); score++;} floodfill(0,0,1); rectangle(350,100,550,200); outtextxy(445,150,"R"); outtextxy(0,0,"3. If NR = 9.6, find QO"); outtextxy(10,20,"a 23.2"); line(350,100,550,200); outtextxy(340,80,"N"); outtextxy(10,40,"b 19.2"); line(550,100,350,200); outtextxy(340,200,"Q"); outtextxy(10,60,"c 13.6"); outtextxy(560,80,"O"); outtextxy(560,200,"P"); outtextxy(10,80,"d 9.6"); outtextxy(540,110,"4");outtextxy(540,170,"3"); gotoxy(1,8); outtextxy(385,180,"1");outtextxy(510,180,"2"); cin>>ans; if(strcmp(ans,"b")==0){sound(); score++;} floodfill(0,0,1); rectangle(350,100,550,200); outtextxy(445,150,"R"); outtextxy(0,0,"4. If àNQP = 13x-7 and àPON = 9x+29, find x."); outtextxy(10,20,"a 7"); line(350,100,550,200); outtextxy(340,80,"N"); outtextxy(10,40,"b 9"); line(550,100,350,200); outtextxy(340,200,"Q"); outtextxy(10,60,"c 11"); outtextxy(560,80,"O"); outtextxy(560,200,"P"); outtextxy(10,80,"d 13"); outtextxy(540,110,"4");outtextxy(540,170,"3"); gotoxy(1,8); outtextxy(385,180,"1");outtextxy(510,180,"2"); cin>>ans; if(strcmp(ans,"a")==0){sound(); score++;} floodfill(0,0,1); outtextxy(0,0,"5. Find SR."); outtextxy(10,20,"a 7"); outtextxy(100,30,"ÄÄÄÅÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄ"); outtextxy(10,40,"b -2"); outtextxy(100,40," -2 0 7 "); outtextxy(10,60,"c 9"); outtextxy(100,20," S R "); outtextxy(10,80,"d 5"); gotoxy(1,8); cin>>ans; if(strcmp(ans,"c")==0){sound(); score++;} floodfill(0,0,1); outtextxy(0,0,"6. The midpoint of BC has a coordinate of"); outtextxy(10,20,"a -1« "); outtextxy(100,20," A B C D "); outtextxy(10,40,"b -2«"); outtextxy(100,30,"ÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄÅÄ"); outtextxy(10,60,"c 0"); outtextxy(100,40,"-8 -4 0 4 "); outtextxy(10,80,"d 1"); gotoxy(1,8); cin>>ans; if(strcmp(ans,"b")==0){sound(); score++;} floodfill(0,0,1); outtextxy(0,0,"7. The measure of an angle is ¬ the measure of its supplement."); outtextxy(30,20,"Find the measure of the angle."); outtextxy(10, 40,"a 36"); outtextxy(10, 60,"b 144"); outtextxy(10, 80,"c 54"); outtextxy(10,100,"d 17"); gotoxy(1,8); cin>>ans; if(strcmp(ans,"a")==0){sound(); score++;} floodfill(0,0,1); outtextxy(0,0,"8. If two angles form a linear pair, then they are"); outtextxy(10,20,"a vertical angles"); outtextxy(10,40,"b congruent angles"); outtextxy(10,60,"c complementary angles"); outtextxy(10,80,"d supplementary angles"); gotoxy(1,8); cin>>ans; if(strcmp(ans,"d")==0){sound(); score++;} floodfill(0,0,1); outtextxy(0,0,"9. à1 and à5 are consecutive interior angles for two º lines."); outtextxy(30,20,"If à1 = 5x+9 and à5 = 3x-29, find à1."); outtextxy(10,40,"a 25"); outtextxy(10,60,"b 134"); outtextxy(10,80,"c 200"); outtextxy(10,100,"d 46"); gotoxy(1,8); cin>>ans; if(strcmp(ans,"b")==0){sound(); score++;} floodfill(0,0,1); outtextxy(0,0,"10. Find the value of x."); line(300,100,400,100); line(360,50,360,100); outtextxy(30,20,"Right triangle with the altitude drawn to the hypotenuse."); outtextxy(10,40,"a 2û6"); line(300,100,360,50); line(360,50,400,100); outtextxy(10,60,"b 2û8"); outtextxy(330,100,"6 4"); outtextxy(10,80,"c 2û10"); outtextxy(320,60,"y x z"); outtextxy(10,100,"d 2û15"); gotoxy(1,8); cin>>ans; if(strcmp(ans,"a")==0){sound(); score++;} floodfill(0,0,1); outtextxy(0,0,"11. Find the value of y."); line(300,100,400,100); line(360,50,360,100); outtextxy(30,20,"Right triangle with the altitude drawn to the hypotenuse."); outtextxy(10,40,"a 2û6"); line(300,100,360,50); line(360,50,400,100); outtextxy(10,60,"b 2û8"); outtextxy(330,100,"6 4"); outtextxy(10,80,"c 2û10"); outtextxy(320,60,"y x z"); outtextxy(10,100,"d 2û15"); gotoxy(1,8); cin>>ans; if(strcmp(ans,"d")==0){sound(); score++;} floodfill(0,0,1); outtextxy(0,0,"12. Find the value of z."); line(300,100,400,100); line(360,50,360,100); outtextxy(30,20,"Right triangle with the altitude drawn to the hypotenuse."); outtextxy(10,40,"a 2û6"); line(300,100,360,50); line(360,50,400,100); outtextxy(10,60,"b 2û8"); outtextxy(330,100,"6 4"); outtextxy(10,80,"c 2û10"); outtextxy(320,60,"y x z"); outtextxy(10,100,"d 2û15"); gotoxy(1,8); cin>>ans; if(strcmp(ans,"c")==0){sound(); score++;} floodfill(0,0,1); outtextxy(0,0,"13. Find the value of x."); line(300,80,400,80); rectangle(390,70,400,80); outtextxy(10,20,"a 8"); line(300,80,400,20); line(400,20,400,80); outtextxy(10,40,"b 10"); outtextxy(330,35,"10 6"); outtextxy(10,60,"c 16"); outtextxy(350,75,"x"); outtextxy(10,80,"d 36"); gotoxy(1,8); cin>>ans; if(strcmp(ans,"a")==0){sound(); score++;} floodfill(0,0,1); outtextxy(0,0,"14. Find the value of x."); rectangle(300,50,360,110); outtextxy(10,20,"a 10û2"); line(300,50,360,110); rectangle(300,100,310,110); outtextxy(10,40,"b 12û2"); outtextxy(330,40,"³"); outtextxy(10,60,"c 10"); outtextxy(268,70,"6û2- x -"); outtextxy(10,80,"d 12"); outtextxy(330,100,"³|"); gotoxy(1,8); cin>>ans; if(strcmp(ans,"d")==0){sound(); score++;} floodfill(0,0,1); outtextxy(0,0,"15. Find the length of an apothem of a square of its area is 100mý."); outtextxy(10,20,"a 1"); outtextxy(10,40,"b 2"); outtextxy(10,60,"c 5"); outtextxy(10,80,"d 10"); gotoxy(1,8); cin>>ans; if(strcmp(ans,"c")==0){sound(); score++;} floodfill(0,0,1); outtextxy(0,0,"16. Find the area of a circle with diameter of 8.8cm."); outtextxy(10,20,"a 19.36"); outtextxy(10,40,"b 60.82"); outtextxy(10,60,"c 64.64"); outtextxy(10,80,"d 77.44"); gotoxy(1,8); cin>>ans; if(strcmp(ans,"b")==0){sound(); score++;} floodfill(0,0,1); outtextxy(0,0,"17. Find the area of a rhombus whose diagonals are 10 and 15."); outtextxy(10,20,"a 75"); outtextxy(10,40,"b 100"); outtextxy(10,60,"c 115"); outtextxy(10,80,"d 225"); gotoxy(1,8); cin>>ans; if(strcmp(ans,"a")==0){sound(); score++;} floodfill(0,0,1); outtextxy(0,0,"18. Find the surface area of a sphere with a radius of 10."); outtextxy(10,20,"a 600ã"); outtextxy(10,40,"b 400ã"); outtextxy(10,60,"c 200ã"); outtextxy(10,80,"d 100ã"); gotoxy(1,8); cin>>ans; if(strcmp(ans,"b")==0){sound(); score++;} floodfill(0,0,1); outtextxy(0,0,"19. Find the total surface area of a square pyramid with a slant"); outtextxy(30,20,"height of 18 and a lateral area of 216."); outtextxy(10,40,"a 162"); outtextxy(10,60,"b 216"); outtextxy(10,80,"c 252"); outtextxy(10,100,"d 324"); gotoxy(1,8); cin>>ans; if(strcmp(ans,"c")==0){sound(); score++;} floodfill(0,0,1); outtextxy(0,0,"20. Find th evolume of a cone with radius of 6 and height of 10."); outtextxy(30,20,"Use 3.14 for ã."); outtextxy(10,40,"a 60"); outtextxy(10,60,"b 188.4"); outtextxy(10,80,"c 120"); outtextxy(10,100,"d 376.8"); gotoxy(1,8); cin>>ans; if(strcmp(ans,"d")==0){sound(); score++;} closegraph(); grade(); } void precalnotes() { clrscr(); cout<<"Functions:"<>ans; if(strcmp(ans,"b") == 0) {sound(); score++;} clrscr(); cout<<"2. tan(-14ã/3) = "<>ans; if(strcmp(ans,"c") == 0) {sound(); score++;} clrscr(); cout<<"3. tan[ arcsin(û3/2) ] = "<>ans; if(strcmp(ans,"d") == 0) {sound(); score++;} clrscr(); cout<<"4. Specify the period of y = ¬cos2x. "<>ans; if(strcmp(ans,"c") == 0) {sound(); score++;} clrscr(); cout<<"5. cos50øcos10ø - sin50øsin10ø"<>ans; if(strcmp(ans,"d") == 0) {sound(); score++;} clrscr(); cout<<"6. 1 + tanýx = "<>ans; if(strcmp(ans,"a") == 0) {sound(); score++;} clrscr(); cout<<"Given f(x) = 1/x and g(x) = x-1 "<>ans; if(strcmp(ans,"a") == 0) {sound(); score++;} cout<>ans; if(strcmp(ans,"b") == 0) {sound(); score++;} clrscr(); cout<<"9. Solve for x. 10^(2x) = 55."<>ans; if(strcmp(ans,"d") == 0) {sound(); score++;} clrscr(); cout<<"10. Solve for x. 5^(2x-1) = 55."<>ans; if(strcmp(ans,"c") == 0) {sound(); score++;} clrscr(); cout<<"11. Simplify. csc(x)sin(ã/2 - x)."<>ans; if(strcmp(ans,"a") == 0) {sound(); score++;} clrscr(); cout<<"12. Find x. log n^(3ab) = x"<>ans; if(strcmp(ans,"b") == 0) {sound(); score++;} clrscr(); cout<<"13. Simplify. 2ln(x) - 2ln(y) + «ln(z)."<>ans; if(strcmp(ans,"b") == 0) {sound(); score++;} clrscr(); cout<<"14. Solve. log 1 = "<>ans; if(strcmp(ans,"a") == 0) {sound(); score++;} clrscr(); cout<<"15. If à = 85ø, then the radian measure of à is"<>ans; if(strcmp(ans,"a") == 0) {sound(); score++;} clrscr(); cout<<"16. Solve for n. 9ü = (1/27)^(n+5)."<>ans; if(strcmp(ans,"d") == 0) {sound(); score++;} clrscr(); cout<<"17. Find x. 2log (x+1) - log x = 1"<>ans; if(strcmp(ans,"c") == 0) {sound(); score++;} clrscr(); cout<<"18. What is the fifth term in the sequence defined by t1 = 4, "<>ans; if(strcmp(ans,"d") == 0) {sound(); score++;} clrscr(); cout<<"19. Give the polar coordinates for the rectangular coordinate (3,4)."<>ans; if(strcmp(ans,"c") == 0) {sound(); score++;} clrscr(); cout<<"20. sinýé + secýé + cosýé + cscýé - cotýé - tanýé - 1 = "<>ans; if(strcmp(ans,"b") == 0) {sound(); score++;} getch(); grade(); } void main() { clrscr(); cout<<" MATH TUTORAL"; cout<