online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include <iostream> #include <bitset> //#include <iomanip> using namespace std; int main() { int p=0b1100; int q=0b1010; // p==((~p)|q) //https://www.matemaks.pl/metoda-zero-jedynkowa-dowodzenia-tautologii.html cout<<"Tautologia: "<<boolalpha<<(bool)(p==((~p)|q))<<'\n'; cout<<"((~p)|q))"<<bitset<4>((~p)|q)<<endl; // https://www.matemaks.pl/i-prawo-de-morgana.html // (∼(p∧q))⇔((∼p)∨(∼q)) cout<<"Tautologia: "<<boolalpha<<(bool)((~(p&q))==((~p)|(~q)))<<'\n'; cout<<"((~(p&q))"<<bitset<4>(~(p&q))<<endl; cout<<"((~p)|(~q))"<<bitset<4>((~p)|(~q))<<endl; cout<<"//////////////////////////////////////////////////////////////"<<endl; // [(¬∨)∨¬(∧)] int lub=0b1110; int i = 0b1000; int wyrarzenie=((~lub)|(~(i))); cout<<"[(¬∨)∨¬(∧)]=="<<bitset<4>(wyrarzenie)<<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