online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <stdio.h> #include <locale.h> typedef unsigned short ushort; using namespace std; int main() { setlocale(LC_ALL, "Russian"); ushort num, upp = 0; cout << "Введите число в 16-ичной системе: "; cin >> hex >> num; cin.get(); ushort low = num & 0xFF; for (int i = 0; i < 8; i++) { upp = upp << 1; upp |= (low >> i) & 1; } ushort res = low + 0x100 * upp; cout << "Число преобразовано в: " << hex << res << 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