File handling. - Programmers Heaven

Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

File handling.

misj2lleunmisj2lleun Posts: 4Member
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;


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

Begin
writeln('Enter first row:');
readln(row1[3]);
writeln('Enter second row:');
readln(row[3]);
writeln('Enter third row:');
readln(row3[3]);[/code]



Sign In or Register to comment.