Notes
Notes - notes.io |
Dim n(10, 10) As Integer
Dim nr(10, 10) As Integer
Sub StampaColonne(ByVal righe As Integer, ByVal colonne As Integer)
Dim i, j As Integer
For j = 1 To colonne
For i = 1 To righe
Console.Write(Str(n(i, j)) + vbTab)
nr(j, i) = n(i, j)
Next
Console.WriteLine()
Next
End Sub
Sub SommaColonna(ByVal righe As Integer, ByVal colonne As Integer)
Dim i, j, somma As Integer
For i = 1 To righe
somma = 0
For j = 1 To colonne
somma = somma + nr(i, j)
Next
Console.WriteLine(Str(somma) + vbTab)
Next
End Sub
Sub Carica(ByVal righe As Integer, ByVal colonne As Integer)
Dim i, j As Integer
For i = 1 To righe
For j = 1 To colonne
Randomize()
n(i, j) = (Rnd() * 10) + 1
Next
Next
End Sub
Sub Stampa(ByVal righe As Integer, ByVal colonne As Integer)
Dim i, j As Integer
Console.WriteLine()
For i = 1 To righe
For j = 1 To colonne
Console.Write(Str(n(i, j)) + vbTab)
Next
Console.WriteLine()
Next
Console.WriteLine()
End Sub
Sub Main()
Dim righe, colonne As Integer
'INIZIO INPUT RIGHE'
Console.Write("Quante righe vuoi inserire (max 10)? ")
righe = Console.ReadLine()
While righe > 10
Console.WriteLine("Errore. Input non valido.")
Console.Write("Quante righe vuoi inserire (max 10)? ")
righe = Console.ReadLine()
End While
'INIZIO INPUT COLONNE'
Console.Write("Quante colonne vuoi inserire (max 10)? ")
colonne = Console.ReadLine()
While colonne > 10
Console.WriteLine("Errore. Input non valido.")
Console.Write("Quante colonne vuoi inserire (max 10)? ")
colonne = Console.ReadLine()
End While
Carica(righe, colonne)
Console.WriteLine()
Console.WriteLine()
Console.WriteLine()
Stampa(righe, colonne)
Console.WriteLine()
Console.WriteLine()
Console.WriteLine()
StampaColonne(righe, colonne)
Console.WriteLine()
Console.WriteLine()
Console.WriteLine()
SommaColonna(righe, colonne)
Console.Read()
End Sub
End Module
|
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team