Which of the following statements is correct?
A) The internal energy of a system increases when more work is done by the system than heat was flowing into the system.
B) The internal energy of a system decreases when work is done on the system and heat is flowing into the system.
C) The system does work on the surroundings when an ideal gas expands against a constant external pressure.
D) All statements are true.
E) All statements are false.