473,383 Members | 1,862 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,383 software developers and data experts.

Sorting Eggs with VB... HELP PLEASE

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 1539
Killer42
8,435 Expert 8TB
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(TotalEggsLeft / 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
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 Expert 4TB
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
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 Expert 8TB
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
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...
9
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...
3
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...
0
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...
2
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)...
17
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...
9
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...
1
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...
5
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.