473,490 Members | 2,487 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Comparison between numbers

1 New Member
I am trying to do a homework assignment using VB 2005. This assignment require that I compare numbers using the IF statement. The number range will be from 60 to 130, and there will be an output box that will keep the highest number between that have been entered that is in between 60 and 130. There will also be an output box that keep the lowest number between 60 and 130.

I think what i should write:

If last input > current input then
txtHighestNumber.Text = last input
txtLowestNumber.Text = current input
elseif last input < current input then
txtHighestNumber.Text = current input
txtLowestNumber.Text = last input
End if

But this is only what i think should be written, i don't know the code to represent the last input and current input. For this project there is only one place to enter the number, and so there need to be a way to represent previous inputs.

Can anyone help me?

Thanks
Feb 22 '08 #1
1 863
debasisdas
8,127 Recognized Expert Expert
1.Accept 2 number s from the user
2.Check if the numbers in the range of 60 - 130
3.Compare both the numbers to find out the highest value.
4.Display the high and low value.
5.Else if the numbers are same prompt again to enter a new value.
Feb 22 '08 #2

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

Similar topics

9
1908
by: Xah Lee | last post by:
here's a interesting real-world algoritm to have fun with. attached below is the Perl documentation that i wrote for a function called "reduce", which is really the heart of a larger software. ...
7
1943
by: rickle | last post by:
I'm trying to compare sun patch levels on a server to those of what sun is recommending. For those that aren't familiar with sun patch numbering here is a quick run down. A patch number shows...
10
7229
by: chandra.somesh | last post by:
Hi I recently had to write a small code in a competition ,but my code was rejected cause it failed in 1 of test cases. The problm was .....we are given vector of strings....each string...
29
2588
by: Steven D'Aprano | last post by:
Playing around with comparisons of functions (don't ask), I discovered an interesting bit of unintuitive behaviour: >>> (lambda y: y) < (lambda y: y) False Do the comparison again and things...
6
1623
by: Tom Kelleher | last post by:
Folks, I have a client who will likely be looking at ASP.NET in the near future. They have an internal developer who is convinced there are "scalability problems" with ASP.NET. This client has...
7
2475
by: Alan | last post by:
Hi. I have programmed in C++ before, but I`m a couple of years out of practice. I am seeking some advice on getting started on a quickie project. . . . I have to read a 54MB text file and do a...
18
4970
by: Alan G Isaac | last post by:
>>None >= 0 False True Explanation appreciated. Thanks, Alan Isaac
26
2876
by: Pietro Cerutti | last post by:
Hi group, I always thought that applying a binary operator such as ==, !=, <= or well defined. Now, I'm passing a program through splint and it says: Dangerous equality comparison involving...
0
1107
by: Gabriel Genellina | last post by:
En Thu, 10 Jul 2008 17:37:42 -0300, Ethan Furman <ethan@stoneleaf.us> escribi�: If your objects obey the trichotomy law (an object MUST BE less than, greater than, or equal to another one,...
3
4071
by: itmfl | last post by:
We are writing a program that multiplies two matrices of size n x m and m x n together. The matrices are stored in a file. The user provides the filename in the command line prompt. The file is...
0
7112
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
6974
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
7183
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...
1
6852
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...
1
4878
isladogs
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...
0
4573
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
277
bsmnconsultancy
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...

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.