Maybe someone with some extra time would type such a "scene"(program). |
I have one week to finish it. |
or maybe make it go into a building and then the building should collapse or something |
#include<stdio.h> #include<conio.h> #include<graphics.h> #include<dos.h> #include<math.h> float xa=100.0,ya=100.0,xb=200.0,yb=100.0,xc=200.0,yc=200.0,xd=100.0,yd=200.0; deseneaza_patrat(float xa,float ya,float xb,float yb,float xc,float yc,float xd,float yd) { for(int i=0;i<=2;i++) {line(xa+i,ya+i,xb+i,yb+i); line(xb+i,yb+i,xc+i,yc+i); line(xc+i,yc+i,xd+i,yd+i); line(xd+i,yd+i,xa+i,ya+i); } return 0; } scalare(float xa,float ya,float xb,float yb,float xc,float yc,float xd,float yd) //scalare simpla { for(int i=0;i<=2;i++) {line(xa*i,ya*i,xb*i,yb*i); line(xb*i,yb*i,xc*i,yc*i); line(xc*i,yc*i,xd*i,yd*i); line(xd*i,yd*i,xa*i,ya*i); } return 0; } void rotatia() { float xa1,ya1,xb1,yb1,xc1,yc1,xd1,yd1; int fix=150,fiy=150,i; float a=6.282/360; xa1=xa; xb1=xb; xc1=xc; xd1=xd; ya1=ya; yb1=yb; yc1=yc; yd1=yd; for(i=0;i<360;i++) { setcolor(15); line(xa1,ya1,xb1,yb1); line(xb1,yb1,xc1,yc1); line(xc1,yc1,xd1,yd1); line(xd1,yd1,xa1,ya1); delay(20); setcolor(0); line(xa1,ya1,xb1,yb1); line(xb1,yb1,xc1,yc1); line(xc1,yc1,xd1,yd1); line(xd1,yd1,xa1,ya1); xa1=fix+(xa1-fix)*cos(a)-(ya1-fiy)*sin(a); xb1=fix+(xb1-fix)*cos(a)-(yb1-fiy)*sin(a); xc1=fix+(xc1-fix)*cos(a)-(yc1-fiy)*sin(a); xd1=fix+(xd1-fix)*cos(a)-(yd1-fiy)*sin(a); ya1=fiy+(ya1-fiy)*cos(a)+(xa1-fix)*sin(a); yb1=fiy+(yb1-fiy)*cos(a)+(xb1-fix)*sin(a); yc1=fiy+(yc1-fiy)*cos(a)+(xc1-fix)*sin(a); yd1=fiy+(yd1-fiy)*cos(a)+(xd1-fix)*sin(a); fix++; xa1++; xb1++; xc1++; xd1++; } setcolor(15); line(xa1,ya1,xb1,yb1); line(xb1,yb1,xc1,yc1); line(xc1,yc1,xd1,yd1); line(xd1,yd1,xa1,ya1); } void main() {int gd=DETECT,gm; initgraph(&gd,&gm,"c:\\borlandc\\bgi"); //deseneaza_patrat(xa,ya,xb,yb,xc,yc,xd,yd); //scalare(xa,ya,xb,yb,xc,yc,xd,yd); rotatia(); getch(); closegraph(); clrscr(); } |
or maybe make it go into a building and then the building should collapse or something Are you serious? tbh if i was your teacher i wouldn't even accept that out of respect for what happened... |
I think I can guess Costinkara's native tongue is Spanish |
Well on account of that being years ago and this having absolutely NOTHING to do with it, I would honestly think you were a bad teacher. |
Is that because of the word "informatics"? It kind of stands out. |
//Author: Karanth Srihari //Email ID: hari_karanth@indiatimes.com #include<graphics.h> #include<stdlib.h> #include<conio.h> #include<dos.h> void main() { int gd=DETECT,gm,i,j,p,q,x,y,flag; struct arccoordstype arcinfo; initgraph(&gd,&gm,"c:\\tc"); y=getmaxy()/2; i=0; p=0; q=0; j=0; flag=0; setcolor(WHITE); for(int k=0;k<500;k++) putpixel(random(620),random(419),15); while(!kbhit()) { line(0+i,y+20,0+i,y-20); /*triangle*/ line(0+i,y+20,20+i,y); line(0+i,y-20,20+i,y); ellipse(80+i,y,10-p,350+p,60,25); line(140+i,y+3,130+i,y+8); line(130+i,y+8,140+i,y-5); if(flag==0) p=p+2; if(flag==1) p=p-2; circle(120+i,y-6,5); line(60+i,y-25,30+i,y-45+j); line(30+i,y-45+j,100+i,y-25); line(60+i,y+25,30+i,y+45+q); line(30+i,y+45+q,100+i,y+25); i=i+3; if(i>=638) i=0; if(flag==0) j=j-2,q=q+2; if(flag==1) j=j+2,q=q-2; if(j<=-10) flag=1; else if(j>=0) flag=0; delay(100); cleardevice(); } getch(); closegraph(); } |
Is that because of the word "informatics"? It kind of stands out. And "colegs". In Spanish, "colleagues" is "colegas", although it's somewhat of a false friend. In any case, it looks like I wasn't so far off. He seems to be Italian. |