online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include<iostream> using namespace std; int main() { //declare variables double total; //variable for total of numbers double average; //variable for average of numbers double num; //variable to hold user input //use for loop 5 times for (int i=1; i<=5; i++) { //input number from user cout << "Enter number " << i << ": "; cin >> num; //calculate total of number total = total + num; } //calculate average average = total / 5; //display total and average cout << "Total = " << total << endl; cout << "Average = " << average << 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