Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <graphics.h>
- #include <math.h>
- #include <string.h>
- #include <stdio.h>
- #include <fstream>
- using namespace std;
- int coord_center[50][50], viz[50], a[21][21];
- const float Pi=3.14;
- ifstream in("graf.in");
- //#define PI 3.14
- int m[7];
- void init_graf(int a[21][21])
- {
- for(int i=1;i<=21;i++)
- for(int j=1;j<=21;j++)
- a[i][j]=0;
- }
- void citire_muchii(int a[21][21],int &n)
- {
- in>>n;
- int i,j;
- while(in>>i>>j)
- a[i][j]=1;
- }
- int main()
- {
- int alfa, n, xi, yi, x=500, y=350, R=200, r=40;
- alfa=2*Pi/n;
- cout<<alfa;
- init_graf(a);
- citire_muchii(a,n);
- for(int i=0;i<n;i++)
- {
- if(x>=500)
- xi=x+R*cos(i*alfa);
- else
- xi=x+R*cos(i*alfa);
- if(y>)
- yi=y-R*sin(i*alfa);
- }
- initwindow(1000,1000);
- getch();
- closegraph();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement