online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <ctime> #include <cmath> using namespace std; void zad2(){ int tab[10]; srand(time(NULL)); cout<<"Elementy: "; for (int i=0; i<10; i++){ tab[i]=rand()%20-7; cout<<tab[i]<<" "; } cout<<endl; cout<<"Elementy niepodzielne przez 7: "; for (int i=0; i<10; i++){ if(tab[i]%7!=0){ cout<<tab[i]<<" ";}} cout<<endl; cout<<"Elementy większe niż 4: "; for (int i=0; i<10; i++){ if(tab[i]>4){ cout<<tab[i]<<" ";}} void zad1(){ int tab[6], min, max; cout<<"Podaj elementy: "; for (int i=0; i<6; i++){ cin>>tab[i]; } cout<<endl; cout<<"Twoje elementy: "; for (int i=0; i<6; i++){ cout<<tab[i]<<" ";} min=tab[0]; for (int i=0; i<6; i++){ if(tab[i]<min){ min=tab[i]; }} cout<<"Element minimalny: "<<min<<endl; max=tab[0]; for (int i=0; i<6; i++){ if(tab[i]>max){ max=tab[i]; }} cout<<"Element maksymalny: "<<max<<endl; } int main() { //zad2(); zad1(); 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