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#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include <stdio.h> #include <iostream> #include <cmath> int roundUp(int numToRound, int multiple) { if(multiple == 0) { return numToRound; } return ceil( numToRound / multiple ) * multiple; // int roundDown = ( (int) (numToRound) / multiple) * multiple; // int roundUp = roundDown + multiple; // int roundCalc = roundUp; // return (roundCalc); } int main() { std::cout << roundUp(7, 100) << "\n"; //return 100 std::cout << roundUp(117, 100) << "\n"; //return 200 std::cout << roundUp(477, 100) << "\n"; //return 500 std::cout << roundUp(1077, 100) << "\n"; //return 1100 std::cout << roundUp(52, 20) << "\n"; //return 60 std::cout << roundUp(74, 30) << "\n"; 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