ClrScr;
Repeat
case Print_Menu of
'1': begin
ClrScr;
Write('Enter scalar :'); ReadLn(Sc);
Write('Enter what vector multiply on scalar: {A or B}:');
ReadLn(ch);
case ch of
'A','a': Mul_Vector_On_Scal(Vector_A, Sc,VectorRes_1,Vector_Size);
'B','b': Mul_Vector_On_Scal(Vector_B, Sc,VectorRes_1,Vector_Size);
end;
File_Output := 'MulVecOnScal.txt';
Print_Vector_To_File(VectorRes_1,File_Output,Vector_Size);
Print_Vector_ON_Screen(VectorRes_1,Vector_Size);
ReadLn;
end;
'2': begin
ClrScr;
File_Output := 'AddVecs.txt';
Add_Vector(Vector_A,Vector_B,VectorRes_1,Vector_Size);
Print_Vector_To_File(VectorRes_1,File_Output,Vector_Size);
Print_Vector_ON_Screen(VectorRes_1,Vector_Size);
ReadLn;
end;
'3': begin
ClrScr;
File_Output := 'ScMuVec.txt';
assign(File_On_Disk,File_Output);
rewrite(File_On_Disk);
SC:=Scal_Mul_Vector(Vector_A,Vector_B,Vector_Size);
write(File_On_Disk,SC,' - scalar multiplication of vectors.');
write('Scal_Mul_Vector = ',Sc);
Close(File_On_Disk);
ReadLn;
end;
'4': begin
ClrScr;
Write('Enter number :'); ReadLn(Sc);
Write('Enter what matrix multiply on number: {A or B}:');
ReadLn(ch);
case ch of
'A','a': Mul_Matrix_On_Coef(Matrix_A, Sc,MatrixRes_1,Vector_Size);
'B','b': Mul_Matrix_On_Coef(Matrix_B, Sc,MatrixRes_1,Vector_Size);
end;
File_Output := 'MulMatOnNum.txt';
Print_Matrix_To_File(MatrixRes_1,File_Output,Matrix_Size);
Print_Matrix_ON_Screen(MatrixRes_1,Matrix_Size);
ReadLn;
end;
'5': begin
ClrScr;
Write('Enter what matrix multiply on vector: {A or B}:'); ReadLn(ch);
case ch of
'A','a': begin
Write('Enter what vector multiply on matriox:{AorB}:');
ReadLn(ch);
case ch of
'A','a': Mul_Matrix_On_Vector(Matrix_A, Vector_A,
MatrixRes_1, Matrix_Size);
'B','b': Mul_Matrix_On_Vector(Matrix_A, Vector_B,
MatrixRes_1, Matrix_Size);
end;
end;
'B','b': begin
Write('Enter what vector multiply on matriox:{AorB}:');
ReadLn(ch);
case ch of
'A','a': Mul_Matrix_On_Vector(Matrix_B, Vector_A,
MatrixRes_1, Matrix_Size);
'B','b': Mul_Matrix_On_Vector(Matrix_B, Vector_B,
MatrixRes_1, Matrix_Size);
end;
end;
end;
File_Output := 'MulMatOnVec.txt';
Print_Matrix_To_File(MatrixRes_1, File_Output, Matrix_Size);
Print_Matrix_ON_Screen(MatrixRes_1, Matrix_Size);
ReadLn;
end;
'6': begin
ClrScr;
Add_Matrix(Matrix_A,Matrix_B, MatrixRes_1, Matrix_Size);
File_Output := 'AddMatrix.txt';
Print_Matrix_To_File(MatrixRes_1, File_Output, Matrix_Size);
Print_Matrix_ON_Screen(MatrixRes_1, Matrix_Size);
ReadLn;
end;
'7': begin
ClrScr;
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.