Dear
i am a new member for elakiri and also programing . i ueing vb6 for coding and still im starting for lerning that , if u could pls help me to sole following problems
thanks
sisira
Pls be kind enough to guide me how to coding this
1 st question
Dim input as string ( this string contents random numerical numbers with 1 or 2 digts )
Dim output(7) as integer
X = ( 2 , 3 , 5 , 13 , 16 , 8 , 2)
--------------------------
coding( separated by x as 2,3,……… , and return should be integer )
---------------------------
result should be
output(1)= 2
output(2)= 3
output(3)= 5
output(4)= 13
output(5)= 16
output(6)= 8
output(7)= 2
2 nd question
dim student(5) as integer
dim marks(5) as integer
dim place(5) as integer
student(5)= a,b,c,d,e
a=80
b=25
c=46
d=90
e=10
---------------------------
coding – sorted as a place
---------------------------
result
place(1) =d
place(2) =a
place(3) =c
place(4) =b
place(5) =e
3 rd question
dim givenstring as string (random digets)
dim inputval as string (random digits)
dim res(1) as string
dim res(2) as integer
given string = { 2,4,10, 12, 5,3}
inputval = {1,10,3,20,18,9,55}
--------------------------
---------------------------
coding if any digit of input val contaning given string then “yes” and wich are the value
---------------------------
result
RES(1)= yes - string
RES(2)= 10 , 3 - integer
I want to short method now I am coding this like
If 1st givenstring 1or 2 or 3 or 4 or 5 or6 then……..
If 2 nd givenstring 1or 2 or 3 or 4 or 5 or6 then……..
If 3 rd givenstring 1or 2 or 3 or 4 or 5 or6 then……..
If 4th givenstring 1or 2 or 3 or 4 or 5 or6 then……..
If 5th givenstring 1or 2 or 3 or 4 or 5 or6 then……..
If 6th givenstring 1or 2 or 3 or 4 or 5 or6 then……..
Thanks
sisira
Reply With Quote
(#727)
Unread
i am a new member for elakiri and also programing . i ueing vb6 for coding and still im starting for lerning that , if u could pls help me to sole following problems
thanks
sisira
Pls be kind enough to guide me how to coding this
1 st question
Dim input as string ( this string contents random numerical numbers with 1 or 2 digts )
Dim output(7) as integer
X = ( 2 , 3 , 5 , 13 , 16 , 8 , 2)
--------------------------
coding( separated by x as 2,3,……… , and return should be integer )
---------------------------
result should be
output(1)= 2
output(2)= 3
output(3)= 5
output(4)= 13
output(5)= 16
output(6)= 8
output(7)= 2
2 nd question
dim student(5) as integer
dim marks(5) as integer
dim place(5) as integer
student(5)= a,b,c,d,e
a=80
b=25
c=46
d=90
e=10
---------------------------
coding – sorted as a place
---------------------------
result
place(1) =d
place(2) =a
place(3) =c
place(4) =b
place(5) =e
3 rd question
dim givenstring as string (random digets)
dim inputval as string (random digits)
dim res(1) as string
dim res(2) as integer
given string = { 2,4,10, 12, 5,3}
inputval = {1,10,3,20,18,9,55}
--------------------------
---------------------------
coding if any digit of input val contaning given string then “yes” and wich are the value
---------------------------
result
RES(1)= yes - string
RES(2)= 10 , 3 - integer
I want to short method now I am coding this like
If 1st givenstring 1or 2 or 3 or 4 or 5 or6 then……..
If 2 nd givenstring 1or 2 or 3 or 4 or 5 or6 then……..
If 3 rd givenstring 1or 2 or 3 or 4 or 5 or6 then……..
If 4th givenstring 1or 2 or 3 or 4 or 5 or6 then……..
If 5th givenstring 1or 2 or 3 or 4 or 5 or6 then……..
If 6th givenstring 1or 2 or 3 or 4 or 5 or6 then……..
Thanks
sisira
Reply With Quote
(#727)
Unread


