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 <iostream> #include <iomanip> // pour std::fixed et std::setprecision using namespace std; int main() { float prixCafe = 1.0f, piece, sommeInsere = 0.0f, monnaie; cout << "Distributeur de café 1€" << endl; cout << "Insérer des pièces (0.05/0.1/0.2/0.5 ou 1 €) : "; cin >> piece; sommeInsere = piece; while (sommeInsere < prixCafe) { cout << fixed << setprecision(2) << "Il faut encore insérer " << (prixCafe - sommeInsere) << " €" << endl; cin >> piece; sommeInsere += piece; } cout << "Voici votre café, merci d'avoir utilisé le distributeur." << endl; if (sommeInsere > prixCafe) { monnaie = sommeInsere - prixCafe; cout << "Voici votre monnaie : " << fixed << setprecision(2) << monnaie << " €" << 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