online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <string.h> #include <algorithm> #include <cstdlib> using namespace std; // deklaracja struktury struct Informacja_o_studencie { unsigned index; }; int main() { Informacja_o_studencie studenci[5]; // tablica ze struktury for (int i = 0; i < 5; i++) { // pobieramy dane cout << "Podaj imie studenta numer " << i + 1 << ": "; cin >> studenci[i].index; cout << "\n"; } for (int i = 0; i < 5; i++) { // wyświetlamy tablicę cout << "------Student numer " << i + 1 << "-------" << endl; cout << "Imie: " << studenci[i].index << endl; cout << "\n"; } const auto [min, max] = minmax_element(begin(studenci), end(studenci), [](Informacja_o_studencie a, Informacja_o_studencie b) { return a.index < b.index; }); cout << "min = " << min ->index << ", max = " << max->index << '\n'; 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