molchanovaelena284
?>

Написать в паскале программу, которая реализует алгоритм работы кассира, сдачу наименьшим количеством банкнот по 500, 100, 50, 10 рублй

Информатика

Ответы

sergeevich
Var _500,_100,_50,_10,money_get: integer; beginwriteln('введите стоимость товара'); readln(money_get); while(money_get mod 10 < > 0) do        begin        writeln('стоимость должна делиться на 10, попробуйте еще раз');         readln(money_get);         end; while (money_get> =500) do        begin        _500: =_500+1;         money_get: =money_get-500;         end; while (money_get> =100) do        begin        _100: =_100+1;         money_get: =money_get-100;         end; while (money_get> =50) do        begin        _50: =_50+1;         money_get: =money_get-50;         end; while (money_get> =10) do        begin        _10: =_10+1;         money_get: =money_get-10;         end; writeln(_500,': 500 рублей',_100,': 100 рублей',_50,': 50 рублей',_10,': 10 рублей'); readln; end.
miyulcha8077
Var a,b,c,z: real;   begin    writeln('введите номер месяца и число');   readln(a,b);   if a=1 then a: =1  else if a=2 then a: =30  else if a=3 then a: =60   else if a=4 then a: =90  else if a=5 then a: =120   else if a=6 then a: =150   else if a=7 then a: =180   else if a=8 then a: =210   else if a=9 then a: =240   else if a=10 then a: =270   else if a=11 then a: =300   else if a=12 then a: =330;   if b> 30 then writeln('-1');   c: =a+b;   z: =365-c;   writeln('до нового года ещё ',z,'дней/я');   end.
Viktorovna1012
Var a,b,c: integer; begin c: =365; read(a,b); if a> 1 then c: =c-31; if a=1 then c: =c-b; if a> 2 then c: =c-28; if a=2 then c: =c-b; if a> 3 then c: =c-31; if a=3 then c: =c-b; if a> 4 then c: =c-30; if a=4 then c: =c-b; if a> 5 then c: =c-31; if a=5 then c: =c-b; if a> 6 then c: =c-30; if a=6 then c: =c-b; if a> 7 then c: =c-31; if a=7 then c: =c-b; if a> 8 then c: =c-31; if a=8 then c: =c-b; if a> 9 then c: =c-30; if a=9 then c: =c-b; if a> 10 then c: =c-31; if a=10 then c: =c-b; if a> 11 then c: =c-30; if a=11 then c: =c-b; if a> 12 then c: =c-31; if a=12 then c: =c-b; write(c); end.

Ответить на вопрос

Поделитесь своими знаниями, ответьте на вопрос:

Написать в паскале программу, которая реализует алгоритм работы кассира, сдачу наименьшим количеством банкнот по 500, 100, 50, 10 рублй
Ваше имя (никнейм)*
Email*
Комментарий*

Популярные вопросы в разделе

energycomplect5914
buhtovarish
Monstr13
polotovsky
yuip2008
Роман_Гречина
ska67mto3983
vyborovvs
marinazubcko16729
Peshkov
MislitskiiSergei1403
Devaunka40
marvindkc
alenih13
levickaalubov5