Let's call the voltage source you label [voltage] "Vsource"
If you hook a voltage source between output and ground, then it will hold output the same as the voltage source. In other words, Vout = Vsource. In terms of the program, it would look like this:
//FOR T = 0 TO 1 STEP DT // IL = IL + (Vin-Vout) * DT / L // IR = Vsource / R // IC = "indeterminate" // Vout = Vsource //NEXT
Note, this probably isn't what you want, and isn't very interesting. If Vin and Vsource are unequal, then you essentially have a short through the coil, which will produce an infinite current in the coil. The capacitor voltage will equal Vsource, and the capacitor current would either be 0 (for DC) or infinite (for AC).
If you assume some source resistance (call it Rsource) in series with your voltage source, then things calm down a bit. Here's what that would look like:
//FOR T = 0 TO 1 STEP DT // IRsource = (Vout-Vsource) / Rsource // IL = IL + (Vin-Vout) * DT / L // IR = Vout / R // IC = IL - IR - IRsource // Vout = Vout + IC * DT / C //NEXT