Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

lab - Vova / 08_1 / main

.cpp
Скачиваний:
6
Добавлен:
15.06.2014
Размер:
567 б
Скачать
#include "iostream"
#include "graphics"
#include "dos.h"
#include "stdlib.h"
#include "conio.h"
#include "math.h"

int main()
{
	int gdriver = DETECT,gmode,errorcode;
	int x,y;
	
	initgraph(&gdriver,&gmode,"");
	
	setbkcolor(1);
	setcolor(15);
	outtextxy(340,200,"y = cos(x)  (схематически)");
	setcolor(12);
	line((getmaxx()/2)-5,0,(getmaxx()/2)-5,getmaxy());
	line(0,getmaxy()/2,getmaxx(),getmaxy()/2);
	
	for (x=0;x<=640;x++)
	{
		y=(20*cos(0.07*x))+getmaxy()/2;
		putpixel(x,y,10);
	}
	
	//circle(x,y,100);
	getch();
	closegraph();
}
Соседние файлы в папке 08_1
  • #
    15.06.201427.65 Кб608_1.ncb
  • #
    15.06.2014897 б708_1.sln
  • #
    15.06.20148.7 Кб608_1.suo
  • #
    15.06.20143.37 Кб608_1.vcproj
  • #
    15.06.2014567 б6main.cpp