online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
# You can perform mathematical operations on variables # Imagine we have three groups with different totals of students group1 = 100 group2 = 50 group3 = 75 # You can get the total of all groups through addition total = group1 + group2 + group3 print("The total is: " + str(total)) # Note that str(number) gives a string variables from a number # You can do the same with other operators half = total / 2 print("Half of the total is: " + str(half)) double = total * 2 print("Double of the total is: " + str(double)) # Below, try to print out the value of the total students if one of the groups dropped out (subtraction) #redTotal = ? #print("The reduced total is: " + str(redTotal))

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