File handling.

I'm beginner and i need to do that program :

File (input.txt) have three rows and each row has exactly three integers(I need to ask user to enter integers). Establish a program that reads in integers and writes them in reverse order (i need to exchange rows and columns to ) in file output.txt.

Like. If i have numbers :

14 67 34 17 2 89
29 45 32 then ===> 32 45 29
89 2 17 34 67 14

I've done something but i think it's 100% wrong...I've been struggling with that some weeks and i don't know what to do.

[code]Program kt6_2;

row1 : array[1..3] of integer;
row2 : array[1..3] of integer;
row3 : array[1..3] of integer;

writeln('Enter first row:');
writeln('Enter second row:');
writeln('Enter third row:');

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!