how can I display a set of numbers like this:
1 2 3 4 5 6 ...
instead of this
1
2
3
4
5
.... 9 1393
WHat are you trying to display it in?
"freddy" <an*******@disc ussions.microso ft.com> wrote in message
news:04******** *************** *****@phx.gbl.. . how can I display a set of numbers like this: 1 2 3 4 5 6 ... instead of this 1 2 3 4 5 ...
numbers from 1 to 50 ---> that way and
1
to
50
that way -----Original Message----- WHat are you trying to display it in? "freddy" <an*******@disc ussions.microso ft.com> wrote in
messagenews:04******* *************** ******@phx.gbl. .. how can I display a set of numbers like this: 1 2 3 4 5 6 ... instead of this 1 2 3 4 5 ...
.
Where do you want these to appear though, in what control?
"freddy" <an*******@disc ussions.microso ft.com> wrote in message
news:05******** *************** *****@phx.gbl.. . numbers from 1 to 50 ---> that way and 1 to 50 that way
-----Original Message----- WHat are you trying to display it in? "freddy" <an*******@disc ussions.microso ft.com> wrote in messagenews:04******* *************** ******@phx.gbl. .. how can I display a set of numbers like this: 1 2 3 4 5 6 ... instead of this 1 2 3 4 5 ...
.
in a console app.using a for loop -----Original Message----- Where do you want these to appear though, in what control? "freddy" <an*******@disc ussions.microso ft.com> wrote in
messagenews:05******* *************** ******@phx.gbl. .. numbers from 1 to 50 ---> that way and 1 to 50 that way
>-----Original Message----- >WHat are you trying to display it in? >"freddy" <an*******@disc ussions.microso ft.com> wrote in message >news:04******* *************** ******@phx.gbl. .. >> how can I display a set of numbers like this: >> 1 2 3 4 5 6 ... >> instead of this >> 1 >> 2 >> 3 >> 4 >> 5 >> ... >> > > >. >
.
For to build a single string or line
"freddy" <an*******@disc ussions.microso ft.com> wrote in message
news:06******** *************** *****@phx.gbl.. . in a console app.using a for loop-----Original Message----- Where do you want these to appear though, in what control? "freddy" <an*******@disc ussions.microso ft.com> wrote in messagenews:05******* *************** ******@phx.gbl. .. numbers from 1 to 50 ---> that way and 1 to 50 that way
>-----Original Message----- >WHat are you trying to display it in? >"freddy" <an*******@disc ussions.microso ft.com> wrote in message >news:04******* *************** ******@phx.gbl. .. >> how can I display a set of numbers like this: >> 1 2 3 4 5 6 ... >> instead of this >> 1 >> 2 >> 3 >> 4 >> 5 >> ... >> > > >. >
.
Freddy,
I hope this is not a homework question! ;-) 1 to 50 that way
For i As Integer = 1 to 50
Console.WriteLi ne(i)
Next i
numbers from 1 to 50 ---> that way
For i As Integer = 1 to 50
Console.Write(i )
Console.Write(" "c)
Next i
Console.WriteLi ne()
Notice in the first one I used WriteLine to cause each item to appear on a
line by itself, where as in the second one I only used Write inside the
loop, and a WriteLine outside to loop to get a single line of output. (of
course the second one will wrap by itself once the line gets past 25
characters ;-))
Hope this helps
Jay
"freddy" <an*******@disc ussions.microso ft.com> wrote in message
news:06******** *************** *****@phx.gbl.. . in a console app.using a for loop-----Original Message----- Where do you want these to appear though, in what control? "freddy" <an*******@disc ussions.microso ft.com> wrote in messagenews:05******* *************** ******@phx.gbl. .. numbers from 1 to 50 ---> that way and 1 to 50 that way
>-----Original Message----- >WHat are you trying to display it in? >"freddy" <an*******@disc ussions.microso ft.com> wrote in message >news:04******* *************** ******@phx.gbl. .. >> how can I display a set of numbers like this: >> 1 2 3 4 5 6 ... >> instead of this >> 1 >> 2 >> 3 >> 4 >> 5 >> ... >> > > >. >
.
I just want to understand the code. I think I can use
jagged array,the problem is evertime I do a search it
comes up with c# not vb.net. -----Original Message----- Freddy, I hope this is not a homework question! ;-)
>> 1 >> to >> 50 >> that way For i As Integer = 1 to 50 Console.WriteLi ne(i) Next i >> numbers from 1 to 50 ---> that way For i As Integer = 1 to 50 Console.Write(i ) Console.Write(" "c) Next i Console.WriteLi ne()
Notice in the first one I used WriteLine to cause each
item to appear on aline by itself, where as in the second one I only used
Write inside theloop, and a WriteLine outside to loop to get a single
line of output. (ofcourse the second one will wrap by itself once the line
gets past 25characters ;-))
Hope this helps Jay "freddy" <an*******@disc ussions.microso ft.com> wrote in
messagenews:06******* *************** ******@phx.gbl. .. in a console app.using a for loop >-----Original Message----- >Where do you want these to appear though, in what
control? >"freddy" <an*******@disc ussions.microso ft.com> wrote in message >news:05******* *************** ******@phx.gbl. .. >> numbers from 1 to 50 ---> that way and >> 1 >> to >> 50 >> that way >> >> >-----Original Message----- >> >WHat are you trying to display it in? >> >"freddy" <an*******@disc ussions.microso ft.com>
wrote in >> message >> >news:04******* *************** ******@phx.gbl. .. >> >> how can I display a set of numbers like this: >> >> 1 2 3 4 5 6 ... >> >> instead of this >> >> 1 >> >> 2 >> >> 3 >> >> 4 >> >> 5 >> >> ... >> >> >> > >> > >> >. >> > > > >. >
.
Freddy, I just want to understand the code.
Understand what code, you have not shown any code, you asked how to
"display" something...
I think I can use jagged array,the problem is evertime I do a search it comes up with c# not vb.net.
Now up until this message you made no mention of an array. My code does not
involve arrays!
What is it you want to do, do you want to print numbers on the console as I
have shown? Or do you have an array question?
Do you want an array with a single column of 50 values?
Dim x(49) As Integer ' remember its high bound, not length
Do you want an array with a single row of 50 values?
Dim x(0,49) As Integer
Do you want a jagged array? (note: VB.NET also refers to jagged arrays as
"Arrays of arrays")
Dim x()() As Integer
For info on arrays in VB.NET see: http://msdn.microsoft.com/library/de...bconArrays.asp http://msdn.microsoft.com/library/de...fVBSpec6_8.asp
Or are you asking about something entirely different? ;-)
Hope this helps
Jay
"freddy" <an*******@disc ussions.microso ft.com> wrote in message
news:08******** *************** *****@phx.gbl.. . I just want to understand the code. I think I can use jagged array,the problem is evertime I do a search it comes up with c# not vb.net.-----Original Message----- Freddy, I hope this is not a homework question! ;-)
>> 1 >> to >> 50 >> that way For i As Integer = 1 to 50 Console.WriteLi ne(i) Next i
>> numbers from 1 to 50 ---> that way For i As Integer = 1 to 50 Console.Write(i ) Console.Write(" "c) Next i Console.WriteLi ne()
Notice in the first one I used WriteLine to cause each item to appear on aline by itself, where as in the second one I only used Write inside theloop, and a WriteLine outside to loop to get a single line of output. (ofcourse the second one will wrap by itself once the line gets past 25characters ;-))
Hope this helps Jay "freddy" <an*******@disc ussions.microso ft.com> wrote in messagenews:06******* *************** ******@phx.gbl. .. in a console app.using a for loop >-----Original Message----- >Where do you want these to appear though, in what control? >"freddy" <an*******@disc ussions.microso ft.com> wrote in message >news:05******* *************** ******@phx.gbl. .. >> numbers from 1 to 50 ---> that way and >> 1 >> to >> 50 >> that way >> >> >-----Original Message----- >> >WHat are you trying to display it in? >> >"freddy" <an*******@disc ussions.microso ft.com> wrote in >> message >> >news:04******* *************** ******@phx.gbl. .. >> >> how can I display a set of numbers like this: >> >> 1 2 3 4 5 6 ... >> >> instead of this >> >> 1 >> >> 2 >> >> 3 >> >> 4 >> >> 5 >> >> ... >> >> >> > >> > >> >. >> > > > >. >
.
Both websites are very helpful -----Original Message----- in a console app.using a for loop-----Original Message----- Where do you want these to appear though, in what
control?"freddy" <an*******@disc ussions.microso ft.com> wrote in messagenews:05****** *************** *******@phx.gbl ... numbers from 1 to 50 ---> that way and 1 to 50 that way
>-----Original Message----- >WHat are you trying to display it in? >"freddy" <an*******@disc ussions.microso ft.com> wrote
in message >news:04******* *************** ******@phx.gbl. .. >> how can I display a set of numbers like this: >> 1 2 3 4 5 6 ... >> instead of this >> 1 >> 2 >> 3 >> 4 >> 5 >> ... >> > > >. >
. . This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: August1 |
last post by:
A handful of articles have been posted requesting information on how
to use these functions in addition to the time() function as the seed
to generate unique groups (sets) of numbers - each group consisting of
6 numbers - with a total of 50 groups of numbers.
A well-known girl that some publishing companies use to provide
introductory level textbooks to various Junior Colleges in the U.S.,
not surprisngly, asks for this same exact...
|
by: StenKoll |
last post by:
Help needed in order to create a register of stocks in a company. In
accordance with local laws I need to give each individual share a
number. I have accomplished this by establishing three tables (se
below) then I run a query giving me a running total, which give me the
first stock in the batch purchased by an individual, then I use this
number and add the number of shares in order to find the number of the
individuals' last share.
So...
|
by: Jim Michaels |
last post by:
I need to generate 2 random numbers in rapid sequence from either PHP or
mysql.
I have not been able to do either. I get the same number back several times
from PHP's mt_rand() and from mysql's RAND().
any ideas?
I suppose I could use the current rancom number as the seed for the next
random number. but would that really work?
|
by: Gerard Flanagan |
last post by:
All
would anyone happen to have code to generate Cutter Numbers:
eg. http://www1.kfupm.edu.sa/library/cod-web/Cutter-numbers.htm
or is anyone looking for something to do?-) (I'm under pressure!)
def cutter(lname, fname, book_title):
|
by: LuTHieR |
last post by:
Hi,
I'm reading a string of numbers from a file (using Borland C++ Builder
6), and I'm doing it like this: first I use FileRead to store all the
data in the file to a char* variable (appropriately called 'data').
Then, I read every number using
char *ptr;
int value;
| |
by: newstips6706 |
last post by:
1, 2, 3, 5, 7... PRIME Numbers
________________________________
Definitions
What is a PRIME Number ?
|
by: Ron |
last post by:
I want to write a program that will accept a number in a textbox for
example 23578 and then in a label will display the sum of the odd and
even number like this...
the textbox containsthe number 23578
the label would say:
Sumof odd number is: 15
Sum of even number is: 10
any ideas?
|
by: Peter Oliphant |
last post by:
I would like to be able to create a random number generator that produces
evenly distributed random numbers up to given number.
For example, I would like to pick a random number less than 100000, or
between 0 and 99999 (inclusive).
Further, the I want the range to be a variable. Concretely, I would like to
create the following method:
unsigned long Random( unsigned long num )
|
by: pereges |
last post by:
I need to generate two uniform random numbers between 0 and 1 in C ?
How to do it ?
I looked into rand function where you need to #define RAND_MAX as 1
but will this rand function give me uniformly distributed and unique
numbers ?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |