Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REM Gam3 masfofteen
- REM By Ahmed Fatoum
- 'el goz2 dah thabet 3alatol
- Dim A(3,3) 'ne3araf 3 masfofat dimension'atha 3x3
- Dim B(3,3)
- Dim C(3,3)
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- 'taree2a number 1
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- for i = 1 to 3 'nelef 3l sfof kolaha
- for j = 1 to 3 'nelef 3l a3meda ele fel sfof
- input A(i,j) 'neda5al qeemet el 3onsor ele 3aleeh el door (i,j)
- next j
- next i
- for i = 1 to 3 'nafs el kalam
- for j = 1 to 3
- input B(i,j)
- next j
- next i
- for i = 1 to 3 'nafs el kalam bardak
- for j = 1 to 3
- C(i,j) = A(i,j) + B(i,j)
- print C(i,j) 'nekteb qeemet el 3onsor, momken nesta3'na 3an keda 5ales we ne3mel print A(i,j) + B(i,j) 3alatol
- next j
- print 'ama y5las el saf, ne2leb 3l satr ele b3deeh
- next i
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- 'taree2a number 2
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- for i = 1 to 3 'nelef 3l sfof kolaha
- for j = 1 to 3 'nelef 3l a3meda ele fel sfof
- read x
- A(i,j) = x
- next j
- next i
- for i = 1 to 3 'nafs el kalam
- for j = 1 to 3
- read x ' maynfa3shi read B(i,j) 3alatol am ben7oteha fe x
- B(i,j) = x
- next j
- next i
- for i = 1 to 3 'nafs el kalam bardak
- for j = 1 to 3
- C(i,j) = A(i,j) + B(i,j)
- print C(i,j), 'nekteb qeemet el 3onsor, momken nesta3'na 3an keda 5ales we ne3mel print A(i,j) + B(i,j) 3alatol
- next j
- print
- next i
- DATA 1,-2,3,643,7,37,3,75,-37,53,73,7,35,-753,73,-57,56,7,-897,5,2012 'ay qiyam
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- 'taree2a asra3 shwya (thanks to islam negm)
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- DIM temp(4,4)
- for matrix = 1 to 3
- for i = 1 to 3
- for j = 1 to 3
- x = 0
- if matrix <> 3 then input x
- temp(i,j) = temp(i,j) + x
- if matrix = 3 then print temp(i,j),
- next j
- if matrix = 3 then print
- if matrix <> 2 then
- print "next matrix"
- else
- print "elnateega"
- end if
- next i
- next matrix
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement