Вопрос школьника по предмету Информатика
Решите задачу программированием линейных алгоритмов — Найти произведение цифр заданного четырехзначного числа.
ПППППППОООООООММММОООООГГГГИИИИТТТТЕЕЕЕЕ!!!!!!
Ответ учителя по предмету Информатика
var a,a1,a2,a3,a4,p:integer;
begin
write(‘a = ‘);
readln(a);
a1:=a div 1000;
a2:=a div 100 mod 10;
a3:=a mod 100 div 10;
a4:=a mod 10;
p:=a1*a2*a3*a4;
writeln(‘p = ‘,p);
end.
Пример:
a = 2354
p = 120
Похожие вопросы от пользователей
Task 4. Use a suitable present or past MODAL AUXILIARY:
I can’t find my book. I …………………………………….. (leave) it on the bus.
They don’t answer their phone; they …………………………… (go) away on their vacation.
John went to the movies last night, but he ……….. (stay) at home and ……….. (prepare) his lessons.
The lights have gone out. A fuse ……………………………. (blow).
She ………………………. (go) to school. It’s Saturday.
You were stupid to go skiing here. You …………………………… (break) your leg.
She ……………………. (sing) like an angel when she was a kid.
……………………….. I make a suggestion?
You ……………………… go and see “Batman”. It’s a great film.
10.He came home alone. You ………………………… (let) him do that; he ……………………… (get) lost.
11.He read the message but he ……………………….. (not) understand.
12.I ……………………………. (lend) you the money. Why didn’t you ask me?
13.A: Can I have some sweets? I am hungry. B: You ………………….. hungry. You have just had dinner.
14.Tom ………………………. (write) this, because it is in French and he doesn’t know French.
15.He looked so tired. He ……………………………….. (work) very hard.
16.He ……………. be a very clever boy. He has entered the university very easily.