Program Loto<span>;
</span>Uses Crt<span>;
</span><span>Const lt = 49; <span>(* количество шаров в лототроне *)
</span></span><span>shar = 6; <span>(* количество выигрышных шаров*)
</span></span><span>Var lott,vyb : array [1..shar] of integer<span>;
</span></span><span>i, j, nom, k : integer<span>;
</span></span><span>m:set of byte<span>;
</span></span><span>Begin
</span><span>randomize<span>;
</span></span><span>m:=[]<span>;
</span></span><span>for i:=1 to shar <span>do
begin
repeat
</span></span><span>nom:=1+random(lt);
</span>until not(nom in m)<span>;
</span><span>lott[i]:=nom<span>;
</span></span><span>m:=m+[nom]<span>;
</span></span><span>end<span>;
</span></span><span>writeln('Выберите шаров от 1 до 6 ',lt)<span>;
</span></span><span>m:=[]<span>;
</span></span><span>begin
repeat
write('nom',i,'=');
readln(nom);
until (nom in [1..lt])and not(nom in m);
vyb[i]:=nom;
m:=m+[nom];
end;
clrscr<span>;
</span></span><span>writeln('Номера шаров в лототроне')<span>;
</span></span><span>for i:=1 to shar do
write(lott[i]:3);
writeln<span>;
</span></span><span>writeln('Выбранные шары');
for i:=1 to shar do
write(vyb[i]:3)<span>;
</span></span><span>writeln;
write('Совпавшие шары: ');
k:=0<span>;
</span></span><span>for i:=1 to shar do
for j:=1 to shar <span>do
</span></span><span>if lott[i]=vyb[j] then
<span>begin
</span></span><span>k:=k+1<span>;
</span></span><span>write(lott[i]:3)<span>;
</span></span><span>end<span>;
</span></span><span>if k=0 then write('- нет'<span>)
</span></span><span>else write(' Их количество=',k<span>)
</span></span><span>end<span>.</span></span>
#include <iostream>
using namespace std;
void main(){
for(int i=100;i<=500;i+=50){
double km = i*1.068;
cout<<i<<" verst = "<<km<<" km"<<endl;
}
}