Program velobike;
Uses crt,graph;
Var gr:integer;
gm:integer;
x,y:integer;
begin
gr:=detect;
initgraph(gr,gm,'..\bgi');
x:=600;
y:=250;
repeat
for x:=0 to 600 do
cleardevice;
setbkcolor(8);
setcolor(2);
setlinestyle(1,0,1);
rectangle(1,3,639,475);
setfillstyle(1,6);
bar(2,280,638,475);
setcolor(6);
setfillstyle(1,2);
circle(x-150,y,27);
floodfill(x-140,y-10,6);
setcolor(yellow);
circle(x-150,y,3);
circle(x-0,y,27);
floodfill(x-0,y-10,6);
circle(x-0,y,3);
circle(x-70,y,10);
circle(x-70,y,2);
arc(x-150,y,355,190,30);
arc(x-0,y,445,200,30);
setlinestyle(0,0,2);
line(0,280,639,280);
setcolor(white);
setlinestyle(0,2,3);
moveto(x-110,y-50);
lineto(x-15,y-50);
moveto(x-150,y);
lineto(x-70,y);
lineto(x-10,y-35);
moveto(x-70,y);
lineto(x-110,y-50);
lineto(x-170,y-35);
lineto(x-123,y-35);
moveto(x-0,y);
lineto(x-20,y-73);
lineto(x-40,y-60);
moveto(x-20,y-73);
lineto(x-12,y-90);
lineto(x-180,y-10);
lineto(x-30,y);
setlinestyle(0,0,1);
lineto(x-55,y-20);
setcolor(red);
lineto(x-45,y-20);
setcolor(8);
lineto(x-75,y+20);
lineto(x-85,y+20);
lineto(x-115,y-63);
moveto(x-40,y-60);
lineto(x-50,y-60);
moveto(x-12,y-90);
lineto(x-22,y-90);
setlinestyle(0,0,3);
moveto(x-123,y-63);
lineto(x-103,y-63);
delay(10000);
end;
settextstyle(0,0,3);
outtextxy(30,240,'XoTuTe IIocMoTpeTb eLLLe?');
outtextxy(100,280,' Ha}|{MuTe Enter ');
readln;
until keypressed;
closegraph;
end.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <iostream>
int main(void) {
struct NOTE {
char name[100];
char family[100];
int tele[15];
};
struct NOTE note[5];
int i;
for(i=0;i<5;i++) {
printf("note %d:\n",i);
printf("name?: "); scanf("%s",¬e[i].name);
printf("family?: "); scanf("%s",¬e[i].family);
printf("telephone?: "); scanf("%d",¬e[i].tele);
}
int z[15];
printf("telephone: ");scanf("%d",z[]);
for(i=0;i<5;i++)
if (strcmp(note[i].tele,z)==0){ //<ТУТ СЦУКА РУГАЕТСЯ,НЕ ПОЙМУ ПОЧЕМУ ХЛП
printf("name: %s\n family %s\n telephone %d\n",note[i].name,note[i].family,note[i].tele);
char t[40];
printf("name: "); scanf("%s",t);
if (strcmp(note[i].name,t)==0){
return 0;
Объяснение:
Program velobike;
Uses crt,graph;
Var gr:integer;
gm:integer;
x,y:integer;
begin
gr:=detect;
initgraph(gr,gm,'..\bgi');
x:=600;
y:=250;
repeat
for x:=0 to 600 do
begin
cleardevice;
setbkcolor(8);
setcolor(2);
setlinestyle(1,0,1);
rectangle(1,3,639,475);
setfillstyle(1,6);
bar(2,280,638,475);
setcolor(6);
setfillstyle(1,2);
circle(x-150,y,27);
floodfill(x-140,y-10,6);
setcolor(yellow);
circle(x-150,y,3);
setcolor(6);
setfillstyle(1,2);
circle(x-0,y,27);
floodfill(x-0,y-10,6);
setcolor(yellow);
circle(x-0,y,3);
setcolor(yellow);
circle(x-70,y,10);
circle(x-70,y,2);
setcolor(yellow);
arc(x-150,y,355,190,30);
arc(x-0,y,445,200,30);
setcolor(2);
setlinestyle(0,0,2);
line(0,280,639,280);
setcolor(white);
setlinestyle(0,2,3);
moveto(x-110,y-50);
lineto(x-15,y-50);
moveto(x-150,y);
lineto(x-70,y);
lineto(x-10,y-35);
moveto(x-70,y);
lineto(x-110,y-50);
moveto(x-150,y);
lineto(x-110,y-50);
moveto(x-150,y);
lineto(x-170,y-35);
lineto(x-123,y-35);
moveto(x-0,y);
lineto(x-20,y-73);
lineto(x-40,y-60);
moveto(x-20,y-73);
lineto(x-12,y-90);
moveto(x-150,y);
lineto(x-180,y-10);
moveto(x-0,y);
lineto(x-30,y);
setcolor(6);
setlinestyle(0,0,1);
moveto(x-70,y);
lineto(x-55,y-20);
setcolor(red);
lineto(x-45,y-20);
setcolor(8);
moveto(x-70,y);
lineto(x-75,y+20);
setcolor(6);
lineto(x-85,y+20);
setcolor(6);
moveto(x-110,y-50);
lineto(x-115,y-63);
setcolor(red);
moveto(x-40,y-60);
lineto(x-50,y-60);
moveto(x-12,y-90);
lineto(x-22,y-90);
setcolor(red);
setlinestyle(0,0,3);
moveto(x-123,y-63);
lineto(x-103,y-63);
delay(10000);
end;
settextstyle(0,0,3);
cleardevice;
setcolor(red);
outtextxy(30,240,'XoTuTe IIocMoTpeTb eLLLe?');
outtextxy(100,280,' Ha}|{MuTe Enter ');
readln;
until keypressed;
readln;
closegraph;
end.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <iostream>
int main(void) {
struct NOTE {
char name[100];
char family[100];
int tele[15];
};
struct NOTE note[5];
int i;
for(i=0;i<5;i++) {
printf("note %d:\n",i);
printf("name?: "); scanf("%s",¬e[i].name);
printf("family?: "); scanf("%s",¬e[i].family);
printf("telephone?: "); scanf("%d",¬e[i].tele);
}
int z[15];
printf("telephone: ");scanf("%d",z[]);
for(i=0;i<5;i++)
if (strcmp(note[i].tele,z)==0){ //<ТУТ СЦУКА РУГАЕТСЯ,НЕ ПОЙМУ ПОЧЕМУ ХЛП
printf("name: %s\n family %s\n telephone %d\n",note[i].name,note[i].family,note[i].tele);
}
char t[40];
printf("name: "); scanf("%s",t);
for(i=0;i<5;i++)
if (strcmp(note[i].name,t)==0){
printf("name: %s\n family %s\n telephone %d\n",note[i].name,note[i].family,note[i].tele);
}
return 0;
}
Объяснение: