.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 8th, 2011, 02:32 PM
Jimbo84 Jimbo84 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2011
Posts: 1 Jimbo84 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 m 37 sec
Reputation Power: 0
Arrays, remember earlier entered data(Console application)

Hi,

I have a predefined code(which may not be changed), and by user entered values remembered and display this data like in output below.
Does anyone have any idea to write additional methods or functions for getting this output?

Predefined code:

Code:
Module ArraysDataRemember
   Sub Main()
      Dim count As Integer = 0
      Dim values(1) As Integer
      Do
         PrintValues(values, count)
         '
         Console.Write("Value ? : ")
         Dim newValue As Integer = Console.ReadLine()
         count += 1
         '
         If count > values.Length Then
            values = GetArrayWithDoubledCapacity(values)
         End If
         '
         StoreValue(values, newValue, count - 1)
      Loop
      '
      Console.ReadLine()
   End Sub
   '...
End Module



Output should be(also with Count and Capacity):

Code:
Values (count=0/capacity=2) :
Value ? : 10
Values (count=1/capacity=2) : 10
Value ? : 20
Values (count=2/capacity=2) : 10 20
Value ? : 30
Values (count=3/capacity=4) : 10 20 30
Value ? : 40
Values (count=4/capacity=4) : 10 20 30 40
Value ? : 50
Values (count=5/capacity=8) : 10 20 30 40 50
Value ? : 60
Values (count=6/capacity=8) : 10 20 30 40 50 60
Value ? : 70
Values (count=7/capacity=8) : 10 20 30 40 50 60 70
Value ? : 80
Values (count=8/capacity=8) : 10 20 30 40 50 60 70 80
Value ? : 90
Values (count=9/capacity=16) : 10 20 30 40 50 60 70 80 90
Value ? :

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > Arrays, remember earlier entered data(Console application)


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap