Предмет: Информатика, автор: 1Евгений5

Проверочная работа <Линейные алгоритмы> Вариант 2

Составить программы для вычисления:

a) Полусуммы кубов двух целых чисел с и d;

     Ответ дать с точность до трёх знаков после запятой

б) Произведения цифр четырёхзначного числа.

Ответы

Автор ответа: dav4ever
0

а) uses crt;
var c,d:integer;
s:real;
begin
write('Введите число с: ');
readln(c);
write('Введите число d: ');
readln(d);
s:=(power(c,3)+power(d,3))/2;
writeln('Полусумма кубов равна ',s:5:3);
end.

б) uses crt;
var a,x1,x2,x3,x4,s:integer;
begin
write('Введите четырёхзначное число: ');
readln(a);
x1:=a div 1000;
x2:= a-1000*x1;
x2:=x2 div 100;
x3:=a-1000*x1-100*x2;
x3:=x3 div 10;
x4:=a-1000*x1-100*x2-10*x3;
s:=x1*x2*x3*x4;
writeln('Произведение всех цифр в числе ',a,' равно ',s);
end.

Похожие вопросы
Предмет: Английский язык, автор: Аноним
Task 1. Read the text and fill in the gaps.
Помагите пж
covers /  fashion world /  released a line/ mainstream/ the catwalk / various/ fashion designers/

History was made at recent New York Fashion Week. For the very first time, there was a collection in which every  model walked down (1)_____________ wearing a hijab. The hijab is the veil traditionally worn by Muslim women, which usually (2) __________________the head and chest.   It has got a bad press recently because of it being banned in (3) ________________ parts  the world. However, Muslim designer AnniesaHasibuan from Indonesia wanted to show just how stylish and elegant the hijab could be  and wowed (4) ____________________________ with her creations. MsHasibuan is just 30 years old and becomes the first Indonesian to feature a collection at a prestigious global fashion event. She received a standing ovation at the end her  show in New York.

         There has an upswing  the past few years of (5) _______________________ incorporating Islamic fashion into their design. The international retail clothing company H&M released an advert showing a Muslim model in a hijab, while Dolce and Gabbana (6) _______________________of hijabs aimed at wealthy Muslim customers. Not everyone is happy with the hijab entering (7) _________________________fashion. Some say the new designs are bordering on being un-Islamic. Dr Eva Nisa, a professor of Islamic Studies, said: "The essence Muslim dress is to wear something decent, to be modest. For women, they have to make sure what they're wearing doesn't attract attention of men."       ​