#include<conio.h>
#include<conio.h>
#include<graphics.h>
#include<math.h>
#include<stdio.h>
main()
{int a,n,gd,gm,t; /*t a sz”g=fi*/
 float rad, x, y,u,v;      /*rad=t radi nban; u.v a k‚perny‹ k”zepe*/
 clrscr();
 puts("Mekkora az n param‚ter?"); scanf("%d",&n);
 puts("Mekkora a nagyit s m‚rt‚ke?"); scanf("%d",&a);
 detectgraph(&gd,&gm);
 initgraph(&gd,&gm, "D:\\BGI");
 u=getmaxx()/2; v=getmaxy()/2;
 setbkcolor(YELLOW);
 for(t=0;t<360;t=t+0.1)
 {rad=t*M_PI/180;
  x=u+a*sin(n*rad)*cos(rad);
  y=v+a*sin(n*rad)*sin(rad);
  putpixel(x,y,RED);
 }
 getch();
 closegraph(); //a grafikus m˘d lez z sa
}