In the sentence below, I'd like to see if "were executed" is correct in the context and if it sounds acceptable to the native ear.
What would the output be, e.g. on the computer screen, if the code fragment below were executed?
a=5
b=2
c=a+b
print c
The reason I'm asking is that it didn't sound as good as
What would the output be, e.g. on the computer screen, if the code fragment below were to be executed?