online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <iomanip> using namespace std; int main() { setlocale(LC_ALL, "ru"); int N = 0, i, j; cout << "Вводите размерность матрицы (должны больше 0):" << endl; while (N < 1) { cout << "\tN = "; //cin >> N; N = 5; } double** a = new double* [N]; cout << "Вводите элементы матрицы:" << endl; for (i = 0; i < N; i++) { a[i] = new double[N]; for (j = 0; j < N; j++) { //cout << "\ta[" << i + 1 << "][" << j + 1 << "] = "; //cin >> a[i][j]; a[i][j] = -5 + ( std::rand() % ( 20 - 5 + 1 ) ); } cout << endl; } int imaxRow = 0, iminCol = 0; int jmaxRow = 0, jminCol = 0; cout << "Матрица после ввода:" << endl; for (i = 0; i < N; i++) { for (j = 0; j < N; j++) { cout << setw(5) << a[i][j]; if (a[imaxRow][jmaxRow] < a[i][j]) { imaxRow = i; jmaxRow = j; } if (a[iminCol][jminCol] > a[i][j]) { iminCol = i; jminCol = j; } } cout << endl; } cout << "Максимум: " << a[imaxRow][jmaxRow] <<" строка № " << imaxRow << endl; cout << "Минимум: " << a[iminCol][jminCol] <<" столбец № " <<jminCol << endl; long double mulS = 0.0; for (i = 0; i < N; i++) { mulS += a[imaxRow][i] * a[i][jminCol]; cout << "a[" << imaxRow << "," << i <<"] * a[" << i<<"," << jminCol << "] = " << a[imaxRow][i] << " * " << a[i][jminCol] << " = " << a[imaxRow][i] * a[i][jminCol] << " SUMA = " << mulS << endl; } cout << "Скалярное произведение: " << mulS; cout << endl; system("pause"); return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue