Ответы
Ответ дал:
0
#include <iostream>
#include <stdlib.h>
#include <time.h>
int main()
{
srand(time(NULL));
int a[11];
int s = 0;
for (int i = 1; i < 11; ++i){
a[i] = rand() % 10 + 1;
if ((i-1) && a[i] > a[i-1]) s++;
std::cout << a[i] << ",";
}
std::cout << std::endl << s;
return 0;
}
#include <stdlib.h>
#include <time.h>
int main()
{
srand(time(NULL));
int a[11];
int s = 0;
for (int i = 1; i < 11; ++i){
a[i] = rand() % 10 + 1;
if ((i-1) && a[i] > a[i-1]) s++;
std::cout << a[i] << ",";
}
std::cout << std::endl << s;
return 0;
}
Похожие вопросы
2 года назад
2 года назад
7 лет назад
10 лет назад
10 лет назад
10 лет назад