473,545 Members | 1,479 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sorting Eggs with VB... HELP PLEASE

3 New Member
I am trying to write a program to sort eggs, extra eggs are discarded
the program must have a pop up box for enter the eggs

box type
extra large - 12 dozen (144 eggs)
large - 6 dozen (72 eggs)
medium - 3 dozen (36 eggs)
small - 1 dozen (12 eggs)

example output picture box

given total number of eggs: 952

XL boxes required: 6
L boxes requried: 1
M boxes requried: 0
S boxes requried: 1
Left over discarded Eggs: 4

wouldnt mind having a pop up box saying "would u like to discard extra eggs?"

i think u need to write loops which enter the count for u and work from the 1st inported value
Feb 28 '08 #1
5 1545
Killer42
8,435 Recognized Expert Expert
What version of VB are you working with? And how far along are you in building this?

The overall techynique is probably to start with your total number of eggs and do a loop through each of the box types, starting from the largest. Each time around the loop, some variation on Int(TotalEggsLe ft / BoxCapacity) will give you the number of boxes required. Then you subtract the number of eggs catered for, and loop around again.
Feb 28 '08 #2
jryanfallon
3 New Member
i am working with the newest vb i think... im not to sure how to use a loop is the problem.. i understand kinda... but when i have to take it from the popup box i get lost
Feb 28 '08 #3
debasisdas
8,127 Recognized Expert Expert
i am working with the newest vb i think...
You don't know which version of VB you are working on ?

Do you know what are you doing ?
Feb 28 '08 #4
jryanfallon
3 New Member
im using vb 6.0

i do know what i am doing... i kinda understand loops ... i dont know how to use the entered value in popup box into the loop
Feb 28 '08 #5
Killer42
8,435 Recognized Expert Expert
Just a quick note. VB6 (which I use and like) is over 10 years old, and at least 3 versions behind. So "latest" is probably not entirely accurate.

Could you show us what you've written so far?
Feb 28 '08 #6

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

Similar topics

6
1559
by: Ksenia Marasanova | last post by:
Hi, I have a list that contains nodes from a tree. Each node is a class instance, but I'll use dictionary here to simplify the example. So the list looks like this: Where 'ord_number' is the "sibling index". It's not always properly filled in; sometimes it's the same for several siblings, or doesn't starts with 1.
9
2243
by: seberino | last post by:
I have been using distuils for a while and was wondering when Python Eggs (new project) is better? So basically Python Eggs precompiles and compresses binaries for you so you just have to load it to run your app? Chris
3
4821
by: Mike Orr | last post by:
I'm trying to install a program that uses Durus on a server. It appears that if a Python program uses eggs, it creates a ~/.python-eggs/ directory, so the home directory must be writeable. This conflicts with server environments where you want to run a daemon with minimum privileges. Second, it appears to use the real user ID rather than...
0
1289
by: Jeff Rush | last post by:
Eggs are important to Python and will become more so over the next few years, if understood and embraced by the community. They are a key competitive feature - I've been asked so many times what is the Python equivalent to CPAN and finally we're developing an answer. At PyCon 2007 we need a solid set of talks about eggs, broken down into...
2
2183
by: nisimura | last post by:
Hi, I'm trying to use MySQL Python module on Cygwin. Since there is no binary package, I compiled MySQL C client library and Python module (http://sourceforge.net/projects/mysql-python) manually. But when I was trying to load MySQLdb module, following errors happened. Traceback (most recent call last):
17
2249
by: Harry George | last post by:
....at least around here. I run a corporate Open Source Software Toolkit, which makes hundreds of libraries and apps available to thousands of technical employees. The rules are that a) a very few authorized downloaders obtain tarballs and put them in a depot and b) other users get tarballs from the depot and build from source. ...
9
3327
by: montyphyton | last post by:
Consider the following: Say that i want to get the keys of a, sorted. First thing I tried: None Doesn't work. Probably because I am actually trying to sort the keys of the dictionary without copying them first. If that is the case, fine. Next thing I do:
1
1198
by: oj | last post by:
Hi all! As is about to become apparent, I really don't know what I'm doing when it comes to using eggs. I'm writing some software that is going to be deployed on a machine as a number of eggs. Which is all well and good. These eggs all end up depending on each other; modules in egg A want to import modules in egg B etc.
5
3166
by: lemlimlee | last post by:
hello, this is the task i need to do: For this task, you are to develop a Java program that allows a user to search or sort an array of numbers using an algorithm that the user chooses. The search algorithms that can be used are Linear Search and Binary Search. The sorting algorithms are bubble, selection and Insertion sort. First, the user...
0
7457
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, 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...
0
7802
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7746
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5962
agi2029
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...
1
5320
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4941
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3443
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1869
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
693
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.