online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <ctime>//Для time #include <cstdlib>//Для rand и srand #include <vector> using std::vector; int generateRandom(int min, int max) { double fraction=1.0/(static_cast<double>(RAND_MAX)+1); return static_cast<int> (min + rand() * fraction * (max - min + 1)); } int main() { srand(static_cast<unsigned int>(time(0))); rand(); rand(); int x[36]; vector<int>Y, Z; //Y для положительных, Z - для отрицательных //Инициализация массива x int lengtY = 0; int lengtZ = 0; for (int count_1 = 0; count_1 < 36; ++count_1) { x[count_1] = generateRandom(-32768, RAND_MAX); if (x[count_1] > 0) { Y.resize(++lengtY); Y.at(lengtY - 1) = x[count_1]; } else { Z.resize(++lengtZ); Z[lengtZ - 1] = x[count_1]; } } //Определяем кол-во четных элементов в массиве Y for (int count = 0,evenIntsY=0; count < Y.size(); ++count) { if (Y.at(count) % 2 == 0) ++evenIntsY; } 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