//prog name: //prog description: //written by: //date: //period:4 #include #include #include #include #include #include #include #include #include #include #include #include //******************************************************* //******************************************************* //variable declarations go here int list,x,age2,score,found; char name[400], ans[3],age[20],ans1,supply[5][20],supply2[20],fname1[20],lname1[20],fullname[40]; float totalscore; int supply1; //******************************************************* //******next two lines are for graphics int driver=VGA;//sets driver for graphics int mode=VGAHI;//sets mode for graphics void mainscreen(); void shading(); void value(); void color(); void quality(); void quiz(); void quit(); void menu(); void colorwheel(); void main(); void value_ex(); void shading_ex(); //main stuff goes here void mainscreen()//beginning of main screen****************************** { initgraph(&driver,&mode,"\\TC\\BGI");//open or initialize graph settextstyle(TRIPLEX_FONT,HORIZ_DIR,6); setcolor(YELLOW); outtextxy(145,10,"Welcome To"); outtextxy(155,100,"Mr. Theo's" ); outtextxy(150,190,"Art Tutorial"); //*********paintbrish handle setfillstyle(1,RED); setcolor(RED); line(210,360,390,360); line(210,380,390,380); line(390,360,390,380); line(211,360,211,380); floodfill(215,365,RED); //*********paint //floodfill(xCO,yCO,linecolor); setfillstyle(1,GREEN); setcolor(GREEN); circle(175,340,25); floodfill(178,340,GREEN); circle(168,360,30); floodfill(171,370,GREEN); circle(160,400,15); floodfill(163,400,GREEN); //*********bristles setfillstyle(1,YELLOW); setcolor(YELLOW); line(210,360,170,340); line(210,380,170,400); line(170,340,170,400); line(210,380,210,360); floodfill(175,350,YELLOW); sleep(4); closegraph(); }//end of main screen**************************************************** void shading()//********************************************************** { clrscr(); strcpy(name,"Shading is the use of light and dark colors to show folds, creases, indentations, and shadows on or in objects. Shading is essential to Art."); for(x=0;x<153;x++) { cout<>ans; if(strcmp(ans,"yes")==0) { shading_ex(); } if(strcmp(ans,"no")==0) { clrscr(); strcpy(name,"Then hit any key to return to the main menu."); for(x=0;x<45;x++) { cout<>ans; if(strcmp(ans,"yes")==0) { sleep(2); clrscr(); menu(); } if(strcmp(ans,"no")==0) { clrscr(); quit(); //strcpy(name,"Thanks for visiting Mr. Theo's Art Tutorial."); // for(x=0;x<45;x++) // { // cout<>fname1; cout<<"What is your last name?"<>lname1; strcpy(fullname,""); strcat(fullname,fname1); strcat(fullname," "); strcat(fullname,lname1); cout<<"Your full name is : "<>ans1; switch(ans1) { case '1': clrscr(); strcpy(name,"Correct"); for(x=0;x<8;x++) { cout<>ans1; switch(ans1) { case '1': clrscr(); strcpy(name,"Wrong"); for(x=0;x<6;x++) { cout<>ans1; switch(ans1) { case '1': clrscr(); strcpy(name,"Wrong"); for(x=0;x<6;x++) { cout<>supply[x]; } found=0; cout<<"Enter one of the supplies that you chose before."; cin>>supply2; for(x=0;x<=4;x++) { if(strcmp(supply[x],supply2)==0) { found=found+1; } } cout<<"You have "<>list; if(list==1) { shading(); } if(list==2) { value(); } if(list==3) { color(); } if(list==4) { quality(); } if(list==5) { quiz(); } if(list==6) { quit(); } } while(list!=0); }//end of list*********************************************************** void colorwheel() { clrscr(); initgraph(&driver,&mode,"\\TC\\BGI");//opend or initialize graph setcolor(WHITE); circle(320,240,230); line(320,10,320,470); line(90,240,550,240); line(145,90,320,240); line(320,240,495,90); line(320,240,145,390); line(320,240,495,390); setfillstyle(1,BLUE); floodfill(310,200,WHITE); setfillstyle(1,BROWN); floodfill(330,250,WHITE); setfillstyle(1,MAGENTA); floodfill(325,230,WHITE); setfillstyle(1,GREEN); floodfill(315,245,WHITE); setfillstyle(1,YELLOW); floodfill(315,250,WHITE); setfillstyle(1,GREEN); floodfill(300,245,WHITE); setfillstyle(1,RED); floodfill(400,230,WHITE); setfillstyle(1,WHITE); floodfill(245,230,WHITE); sleep(5); closegraph(); cout<<"Hit any key to return to the main menu."; getch(); menu(); }//end of colorwheel**************************************************** void value_ex()//******************************************************* { clrscr(); initgraph(&driver,&mode,"\\TC\\BGI");//opend or initialize graph setcolor(WHITE); //box(white) line(10,210,605,210); line(605,210,605,270); line(605,270,10,270); line(10,270,10,210); line(160,210,160,270); line(320,210,320,270); line(480,210,480,270); line(605,210,605,270); //color fills setcolor(WHITE); floodfill(100,240,WHITE); setfillstyle(SOLID_FILL,LIGHTGRAY); floodfill(200,240,WHITE); setfillstyle(SOLID_FILL,DARKGRAY); floodfill(400,240,WHITE); } void main()//************************************************************ { clrscr(); mainscreen(); menu(); getch(); } //end of main program