In this topic, you will learn about, Visual Basic Program to find the transpose of a given matrix.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
Private sub command_click Dim M1(3)(3) as integer Dim M2(3)(3) as integer Dim i as integer ,J as integer Dim str as string For i=1 to 3 For j=1 to 3 M1 (i)(j) = inputbox(‘’enter number’’); Next Next For i=1 to 3 For j=2 to 3 M2 (i)(j)=M1(j)(i) Next Next Str=’’first matrix’’ For i=1 to 3 For j=1 to 3 Str =str & M1(i)(j) &VBtab Next Str=str&VBcrlf Next Str=str & ‘’mareix after transpose’’ For i=1 to J For J=1 to J Str =str &M2(i)(j) &VB tab Next Str=str &VBcrlf Next Msgbox(str) Endsub |
Comment below if you have queries related to the above article. Visual Basic Program to find the transpose of a given matrix.