SELF TEST 8
Match the inputs and outputs for the following.....
program READCHARACTERS (input, output); var C1, C2, C3, C4, C5, C6 : char; begin readln( C1, C2, C3, C4, C5, C6 ); writeln(C1, C2, C3, C4, C5, C6 ) end. Inputs Outputs ( spaces shown as _ ) a) Hi there a) A1_B2_ b) Hi b) 57_4_3 there c) 694 c) Hi_the 827 d) 57 4 d) Hi_the 329 e) A1 e) 694_82 B2 C3 Click here for answer
Outputs for Turbo Pascal a) Hi there a) A1 B2 b) Hi b) 57_4 there <enter> c) 694 c) Hi_the 827 d) 57 4 d) Hi 329 th e) A1 e) 694 B2 C3 8
PROGRAM
THREE
Ohm's law states that the voltage (V) in a circuit is equal to
the current flowing in amperes (I) multiplied by the resistance
in the ciruit (R) [ ie, E = I * R ]. Write a program to enter in
the values of resistance and current, displaying the voltage
which would exist.
PROGRAM
FOUR
Write a program which inputs two resistance values, and then
displays their sum value when placed in series and then in
parallel. [ The total series resistance is R1 + R2, whilst the
parallel resistance is (R1 * R2) / (R1 + R2) ]