помогите пожалуйста решить 5 задача (а) очень надо!!
Приложения:

Ответы на вопрос
Ответил Dmon55
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;
}
Новые вопросы