Top.Mail.Ru
Ответы
Аватар пользователя
13лет
Изменено
Аватар пользователя
Аватар пользователя
Аватар пользователя
Программирование
+4

Помогите написать программу по рисунку на языке c++ (Borland c)



Это все, что дал преподаватель

Дополнен

#include <iostream.h>
#include <math.h>
#include <conio.h>

void main ()
{ clrscr();
int i,j;float x,y,h;
h=0,3;
for(x=0;x<4;x=x+h)
{
for(i=0;i<2;i=i+1)
y=1+sqrt(1-(x-1)*(x-1));

count <<" "<

По дате
По рейтингу
Аватар пользователя
Новичок
13лет

//borlandc3.1 VGA

#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
int main(void)
{ char b[20];
int x, y,gdriver=DETECT,gmode,sa=0,ea=180,r = 20;
initgraph(&gdriver, &gmode, "D:\\borlandc\\bgi");
if (graphresult()!=grOk) printf("Press any key to halt:"),getch(),exit(1);
setcolor(getmaxcolor());
line(80,100,80,360);line(80,100,75,110);line(80,100,85,110);
line(60,240,505,240);line(495,245,505,240);line(495,235,505,240);
for(x=100,y=240;x < 480;x+=40)
{
if((x-60) % 160) arc(x,y, sa, ea, r);
itoa((x-100)/20+2,b,10); outtextxy(x-27+40,y+5,b);
}
outtextxy(71,244,"0"); outtextxy(500,245,"x");
outtextxy(85,97,"y"); outtextxy(71,217,"1");
getch();
closegraph();
return 0;
}