profile
Опубликовано 6 лет назад по предмету Информатика от tournesoul

Программу на с++ и блок-схему, если можно:

  1. Ответ
    Ответ дан PatifonKakao
    #include <cstdlib>
    #include <iostream>
    #include <ctime>

    using namespace std;

    int main(int argc, char *argv[])
    {
        int x[10];
        srand(time(0));
        for(int i=0; i<10; ++i) 
         x[i]=-rand()%8+5;
        long r=(x[0]+2*x[1]+x[2]);
        for(int i=2; i<9; ++i)
         r*=(x[i-1]+2*x[i]+x[i+1]);
        cout <<r<<endl;
        system("pause");
        return EXIT_SUCCESS;
    }
Самые новые вопросы