52

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> #include <cmath> #include <ctime> using namespace std; int main() { setlocale(LC_ALL, "ru"); srand(time(NULL)); int size = rand()%10,M = 0, L = 0,K=0,count; int *mass = new int[size]; cout << "size = " << size << endl; for (int i = 0; i < size; i++) { mass[i] = rand() % 20; cout << mass[i] << "\t"; } cout << endl << "input limit elements" << endl; cin >> M >> L; cout << endl << "input a digit" << endl; cin >> K; count = 0; for (M; M <= L; M++) { if (mass[M] % K == 0) count++; } cout << "Digits thats kratnuy " << K << "\t" << count<<endl; delete mass; system("PAUSE"); return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines