Module numbers_1 Sub Main() Dim i, j, n As Integer Console.Write("Enter the number of lines:") n = CInt(Console.ReadLine()) For i = 1 To n For j = 1 To i Console.Write(j & " ") Next Console.WriteLine() Next Console.ReadLine() End Sub End Module
Output
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
GOOD
ReplyDeletemisalkan dirubah jadi gini gan. gimana syntaxnya?
ReplyDelete1
2 3
4 5 6
7 8 9 10
thx gan
Code send me
DeleteSub Main()
DeleteDim i, j, n As Integer
Dim k = 1
Console.Write("Enter the number of lines:")
n = CInt(Console.ReadLine())
For i = 1 To n
For j = 1 To i
Console.Write(k & " ")
k = k +1
Next
Console.WriteLine()
Next
Console.ReadLine()
End Sub
Where It will be printed ???
ReplyDeleteConsole a command prompt like screen.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteit should be like below where .. are replaced by " "
ReplyDelete......1
.....121
....12321
...1234321
..123454321
Private Sub Command1_Click()
DeleteDim A As Integer
Dim B As Integer
Dim X As Integer
Dim OSP As Integer
Dim Z As Integer
Z = 5
X = 1
For A = 1 To 3
For OSP = 1 To Z
Print ".";
Next OSP
Z = Z - 2
Print X * X;
X = X * 10 + 1
Print
Next A
End Sub
MORE THAN 3 LINES ARE OVERFLOWING
it should be like below where .. are replaced by " "
ReplyDelete......1
.....121
....12321
...1234321
..123454321
I have managed to print this sequence instead
1
121
1231
1234321
123454321
whats the code for this
Deletesolution to the problem
ReplyDeleteImports System.Math
Module Module1
Sub Main()
Dim i As Integer
Dim k As Char
Dim l As Integer
Dim b As Integer
Dim a As Integer = 1
Dim s As Integer = 1
k = ""
Dim c As Integer
c = 5
l = c
For i = 0 To l + 1
Console.Write(" ")
Next
Console.Write(1)
Console.WriteLine()
For a = 1 To c
If l > 0 Then
For i = 0 To l
Console.Write(" ")
Next
'Console.WriteLine()
l = l - 1
End If
s = s * 10 + 1
'Console.Write(i)
For b = c - a To b >= 1
b = b - 1
Console.WriteLine()
Next
Console.Write(CLng(Pow(s, 2)))
Console.WriteLine()
Next
Console.ReadLine()
End Sub
End Module
2
ReplyDelete4 6
8 10 12
plz give a solution
Excellent
ReplyDeletenice, but how i do this for windows form not console apps
ReplyDeletenice, but how could i do this for windows form apps not console apps... I need help to solve this
ReplyDelete
ReplyDeleteGood Post! Thank you so much for sharing this pretty post,
it was so good to read and useful to improve my knowledge as updated one, keep blogging.
Java training in Chennai
Java training in Bangalore
Java online training
Java training in Pune
please help me with
ReplyDelete15 15 15
14 14
13
654321
ReplyDelete54321
4321
321
21
1
please help create piramid
Triangle using astrik
ReplyDeletecan u help me to make this shape
ReplyDeleteH
HE
HEL
HELL
HELLO
HELL
HEL
HE
H
Number Triangle 1
ReplyDeleteHow about this.
ReplyDeleteThe output like this
**********
*********
********
*******
******
*****
****
***
**
*
Cn you help me?
Module Module1
Delete'Rufaro Sitotombe
'lower six
Sub Main()
Dim i As Integer
Dim j As Integer
' the asterics that are going to be displayed
For j = 1 To 5
For i = j To 5
Console.Write(" *")
Next i
Console.WriteLine()
Next j
' to display the output
Console.ReadLine()
End Sub
End Module
ndobva ndanzwa kuti ndikudzidzisa apa stots
Deleteukutii koiwe
Deletetaura hako ndokuti vb ukuk
DeletePanyepwa aps
Delete*
ReplyDelete* *
* * * *
* * * * * *
cn u rply me this output coding
hi, everyone
ReplyDeletehow i can do this output coding?
*****
****
***
**
*
or this,
*
**
***
****
*****
i want to particapate the code wich you make
DeleteImports System
DeleteModule Module1
Sub Main()
Dim i, j As Integer
For i = 3 To 1 Step -1
For j = 1 To i
Console.Write("* ")
Next
Console.WriteLine("")
Next
Console.ReadKey()
End Sub
End Module
REPLACE VALUE OF i, which is 3 here to number of rows you need
****
Delete* *
* *
****
hi, everyone
ReplyDeletehow i can do this output coding?
*****
****
***
**
*
or this,
*
**
***
****
*****
Reply
pardon my wrong send, the output should be the other side
DeleteHelp me ..I want something of this sort
ReplyDelete1
12
123
1234
12345
123456
Am using vb 6.0
ReplyDeletedevelop a VB.NET console application to display the following pattern
ReplyDelete*
***
*****
1
ReplyDelete2 3
4 5 6
7 8 9 10
Write a console application to print the following pattern.
Delete1
2 3
4 5 6
7 8 9 10
1
ReplyDelete21
321
4321