Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  as
Language: C/C++
Code:
#include<conio.h>
#include<stdio.h>
#include<math.h>
#include<graphics.h>
//10.FEJEZET 6.FELADAT MEGOLDASA
int main()
{int X,Y,R,maxR;
 puts("Sulyzo rajzolasa");
 initwindow(640,480,"Sulyzo");
 X=640; Y=480;
 maxR=X/10;
 printf("Mekkorak legyenek a gombreszek sugarai? (max %d)",maxR);
 scanf("%d",&R);
 setbkcolor(6);
 line(20,Y-20,X-20,Y-20);
 setcolor(2);
 circle(X/2-floor(3.5*R),Y-20-R,R);
 circle(X/2+floor(3.5*R),Y-20-R,R);
 line(X/2-floor(2.5*R),Y-20-R-R/5,X/2+floor(2.5*R),Y-20-R-R/5);
 line(X/2-floor(2.5*R),Y-20-R+R/5,X/2+floor(2.5*R),Y-20-R+R/5);
 getch();
 closegraph();
 return 0;
}

          
Comments: