А) 42, б)321..в)87...................................
program raf105;
var a:array[1..30,1..20] of string;
i,j,o:integer;
s:string;
begin
for i:=1 to 30 do
for j:=1 to 20 do
a[i,j]:= '';
writeln('Вводите слова по очереди');
writeln('Чтобы закончить введите 0');
repeat
readln(s);
if s <> '0'
then
begin
o:= o+1;
for i:=1 to length(s) do
a[o,i]:= s[i];
end;
until s = '0';
writeln;
writeln('Вывод:');
for i:=1 to o do
begin
for j:=1 to 20 do
if a[i,j] = 'а'
then a[i,j]:= 'о';
for j:=1 to 20 do
if j <> 1
then
begin
a[i,1]:= a[i,1] + a[i,j];
a[i,j]:= '';
end;
writeln(a[i,1]);
end;
end.
#include "iostream"
#include "stdlib.h"
#include "ctime"
using namespace std;
int main()
{
srand(time(NULL));
int snow = 0, rain = 0;
int osadok[31];
int t_weather[31];
for(int i = 0 ; i < 31; i++){
osadok[i] = rand()% 50;
t_weather[i] = rand()% 25 - 5;
}
for(int i = 0 ; i < 31; i++){
cout << osadok[i] << " - " << t_weather[i] << endl;
}
for(int i = 0; i < 31; i++){
if(t_weather[i] > 0){
rain = rain + osadok[i];
}else{
snow = snow + osadok[i];
}
}
cout << "Amount of osadok of snow: " << snow << endl;
cout << "Amount of osadok of rain: " << rain << endl;
return 0;
}
Program n1;
var a,p: integer;
begin
randomize;
a:=random(90)+10;
p:=(a mod 10)*(a div 10);
writeln('произведение цифр числа ',a,' равно ',p);
end.