lab6-122

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; int main() { int array[30]; for (int i=0; i<=29; i++){ array[i] = rand()%60; cout << (i+1) << "-\t" <<array[i] << endl ; } cout << "ведите интервал сисел(c и d)" << endl ; int c , d; cin >> c ; cin >> d ; for (int i=0; i<=29; i++){ if ((array[i] > c) && (array[i] < d)){ cout << "Элемент\t" << array[i]<<"\tпод номером\t"<< (i+1) << "\tпринадлежит отрезку\t" << c << " - " << d << endl; cout <<"--------------------------------------------------------------------------" << endl; } } return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines