М
Молодежь
К
Компьютеры-и-электроника
Д
Дом-и-сад
С
Стиль-и-уход-за-собой
П
Праздники-и-традиции
Т
Транспорт
П
Путешествия
С
Семейная-жизнь
Ф
Философия-и-религия
Б
Без категории
М
Мир-работы
Х
Хобби-и-рукоделие
И
Искусство-и-развлечения
В
Взаимоотношения
З
Здоровье
К
Кулинария-и-гостеприимство
Ф
Финансы-и-бизнес
П
Питомцы-и-животные
О
Образование
О
Образование-и-коммуникации
Altama
Altama
16.11.2020 20:35 •  Информатика

Мну нужен ответы на данные задания обязательно на 2-е, остальные по желанию


Мну нужен ответы на данные задания обязательно на 2-е, остальные по желанию

👇
Открыть все ответы
Ответ:
lesnichka1980
lesnichka1980
16.11.2020

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.

4,7(96 оценок)
Ответ:
masloshick
masloshick
16.11.2020
Romanf romanf отличник 2013-01-10t16: 13: 22+00: 00 1. подумать над алгоритмом 2. вот сам алгоритм: а. спросить у пользователя значения б. расчитать ответ в. выдать ответ на экран 3. написать код в паскале 4. исправить ошибки компиляции 5. протестировать, вводить разные числа 6. обнаружила, что если вводить числа наугад ответ получается отрицательным иногда 7. вставить код проверки введенных пользователем значений 8. убрать ошибки компиляции 9. протестировать 10. готово а вот и сама программа: program aerobus; uses crt; const totalplace = 160; var businessplaces, economyplaces: integer; businessprice, economyprice: real; totalcharge: real; a,b: integer; correctinput: boolean; begin clrscr; businessplaces: =totalplace div 4; economyplaces: = totalplace - businessplaces; writeln('business places count: ', businessplaces); writeln('economy places count: ', economyplaces); correctinput: =false; while not correctinput do begin write('please input business class ticket price: '); readln(businessprice); if(businessprice> 0) then begin correctinput: =true; end else begin writeln('the price should be a positive number, please try again'); end; end; economyprice: =businessprice/2; writeln('economy ticket price is: ', economyprice: 0: 2); correctinput: =false; while not correctinput do begin write('how many business tickets are left? : '); readln(a); if(a> =0) and (a< =businessplaces)then correctinput: =true; if(a< 0) then begin writeln('please input a positive number or 0, please try again'); end; if(a> businessplaces) then begin writeln('please input a number which is less or equal to the tolal business place count, please try again'); end; end; correctinput: =false; while not correctinput do begin write('how many economy tickets are left? : '); readln(b); if(b> =0) and (b< =economyplaces)then correctinput: =true; if(b< 0) then begin writeln('please input a positive number or 0, please try again'); end; if(b> economyplaces) then begin writeln('please input a number which is less or equal to the tolal economy place count, please try again'); end; end; totalcharge: =(businessplaces-a)*businessprice; totalcharge: =totalcharge+(economyplaces-b)*economyprice; writeln('the total charge is: ', totalcharge: 0: 2); writeln; writeln('press enter to exit'); readln; end.
4,6(13 оценок)
Новые ответы от MOGZ: Информатика
logo
Вход Регистрация
Что ты хочешь узнать?
Спроси Mozg
Открыть лучший ответ