online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
index = 2 while True: try: numMonths = float(input(f"Enter the number of months for recorded rainfall in year {index}: ")) if numMonths <= 0: print('The value entered must be greater than zero') else: break # User provided a valid value (number greater than zero) exit loop while except ValueError: print('Use only digits')

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