473,386 Members | 1,883 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

addition off odd numbers and "small numbers" less than number 5

3
i want help
1.how to found odd numbers on my 6 textboxes and make the addition of them
2. how to found "small numbers" less than number 5 and make the addition of them
example

1+3+7=11 odd
1+2+3+4+=10 small nubers less than 5
thank you
Feb 28 '10 #1
4 1440
debasisdas
8,127 Expert 4TB
What is the logic that you are working on ?
Mar 1 '10 #2
memas
3
logic?
what means logic
Mar 1 '10 #3
vb5prgrmr
305 Expert 100+
Logic,... means that a computer is completly logical as any answer is either a 1 or a 0, no in between. Logic, means what code have you written to tell the computer what you want to do. Logic, means the step by step process you will have to go through to figure out how you want the computer to go step by step to solve your problem...
Mar 1 '10 #4
memas
3
this is the code but i dont know how to make the addition of the odd numbers
Dim myTextBoxes As New List(Of TextBox) 'convert the textboxes to new list

myTextBoxes.Add(Me.num20TextBox) 'this is my collection
myTextBoxes.Add(Me.num21TextBox)
myTextBoxes.Add(Me.num22TextBox)

Dim memas, count As Integer 'this is a counter
count = 0 'that counter starts to 0
For Each txt As TextBox In myTextBoxes 'loop for.....next
If Integer.TryParse(txt.Text, memas) Then
If (memas And 1) = 1 Then
count += 1
num35TextBox.Text = count.ToString 'mona
Else
num35TextBox.Text = count.ToString 'zyga
End If
End If
Next
Mar 1 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Paul | last post by:
The following code: <?php header("Content-Type: text/plain"); $numbers = array(3.714, 0.7142857142857143, 9.667, 6.333, 7, 6, 8, 2, 3, -2, 0, -6.6, 2.25, 4.333, -8, 3, 3.141592654, 5.5, 6.5,...
5
by: KenLee | last post by:
help: how can I change from "//localhost:numbers/" to just "//localhost/"? I can see the web pages using "//localhost:numbers/" instead of ""//localhost/". I use asp.net 2.o. and windows 2000....
2
by: jknox13 | last post by:
Hi, I have to find the divisors of all numbers less than a number inputed by the user and state if a number is prime if no divisors. I have this code so far, but I'm getting the wrong output and...
169
by: JohnQ | last post by:
(The "C++ Grammer" thread in comp.lang.c++.moderated prompted this post). It would be more than a little bit nice if C++ was much "cleaner" (less complex) so that it wasn't a major world wide...
5
by: trillianx | last post by:
I know there has been lot of discussion on Prime numbers program but I have very specific question. Here is my program: # Find the prime numbers # This is a user input program that lets you...
3
by: hharry | last post by:
Hello All, I am using the following to format numbers precise to 2 decimal places with thousand separators: Double number = 100000.87; string MyString = String.Format("{0:0,0.00}", number);...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.