Цифры? 1234567890 ******************************************************
#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;
}
Const n=20;
var a:array[1..n] of integer;
b,c,i:integer;
begin
Randomize;
for i:=1 to n do
begin
b:=random(8)+1;
c:=random(9-b)+b+1;
a[i]:=b*10+c;
write(a[i]:4);
end;
writeln;
end.
Пример:
<span> 89 67 19 69 49 67 45 26 79 69 67 79 78 16 38 69 35 57 79 46</span>