online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; int main() { int length, length2; int s1 = 0 , s2 = 0, s3 = 0; cout << "Enter m,n: "; cin >> length >> length2; //first matrix float** a = new float* [length]; for(size_t i = 0; i < length; i++) { a[i] = new float[length2]; } for(size_t i = 0; i < length; i++) { for(size_t j = 0; j < length2; j++) { cout << "Enter first matrix a["<<i<<"["<<j<<"]"; cin >> a[i][j]; s1 += a[i][j]; } } cout << endl; //second matrix float** b = new float* [length]; for(size_t i = 0; i < length; i++) { b[i] = new float[length2]; } for(size_t i = 0; i < length; i++) { for(size_t j = 0; j < length2; j++) { cout << "Enter second matrix b["<<i<<"["<<j<<"]"; cin >> b[i][j]; s2 += b[i][j]; } } cout << endl; //third matrix float** c = new float* [length]; for(size_t i = 0; i < length; i++) { c[i] = new float[length2]; } for(size_t i = 0; i < length; i++) { for(size_t j = 0; j < length2; j++) { cout << "Enter third matrix c["<<i<<"["<<j<<"]"; cin >> c[i][j]; s3 += c[i][j]; } } //s1 if (s1 < s2 && s1 < s3) { for (size_t i = 0; i < length; i++) { for(size_t j = 0; j < length2; j++) { cout << a[i][j] << " "; } cout << endl; } } //s2 if (s2 < s1 && s2 < s3) { for (size_t i = 0; i < length; i++) { for(size_t j = 0; j < length2; j++) { cout << b[i][j] << " "; } cout << endl; } } //s3 if (s3 < s2 && s3<s1) { for (size_t i = 0; i < length; i++) { for(size_t j = 0; j < length2; j++) { cout << a[i][j] << " "; } cout << endl; } } 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