lab7(938)

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; int main() { const int size = 4; int arr[size][size]; for (int i = 0; i < size; i++) for (int j = 0; j < size; j++) { cout<<"a["<<i<<"]["<<j<<"]"<<endl; cin>>arr[i][j]; } int index = 0; cout<<"Enter index:"<<endl; cin>>index; if (index > -1 && index < size) cout<<"Элемент побочной диагонали : "<<arr[size - index - 1][index]; else cout<<"Индекс введен неверно!"; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines