Дамп всех задач
This commit is contained in:
14
C++/v6oid/krugi/main.cpp
Normal file
14
C++/v6oid/krugi/main.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include "mygraph.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
initwindow (500, 500);
|
||||
krugi (250, 250, 150, 6); // X, Y, R, Color.
|
||||
system("PAUSE");
|
||||
closegraph();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
12
C++/v6oid/krugi/mygraph.h
Normal file
12
C++/v6oid/krugi/mygraph.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <graphics.h>
|
||||
#include <conio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void krugi ( int x, int y, int r, int c) {
|
||||
for(int i=r; i>6; i=i-5) {
|
||||
y=y+5;
|
||||
circle (x,y,i);
|
||||
setfillstyle(1, c);
|
||||
floodfill(x,y,15);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user