الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

مساعدة mod function in vb 2010

بدأه mosawa في 26 سبتمبر 2013 · 1 رد · 368 مشاهدة · في Microsoft Visual Basic.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع
السلام عليكم ورحمة الله وبركاه 

احتاج مساعدة اهل في الخبرة في codes vb 2010 

عندي مشروع ومطلبوب اني استخدم mod function فيها لكني عجزت احلها 

هذا هو المشروع
A wood distribution company named Keep Warm Pty Ltd sells small amounts of firewood in bags of different sizes to the public through various retail outlets. The sizes available are:
Bag size 1 kg 2 kg 5 kg
Bag price $3.80 $6.30 $10.50 
The company provides each retail outlet with a program that will calculate the number and combination of bags required to achieve a required kilogram weight.
The basis of the calculation is to select a combination of bags that will
minimise the customer's costs. You are required to create the system using Visual Basic, with all the requirements above. You are allowed 
to make changes to the layout of the interface below
 
 

post-277558-0-49132200-1380212092_thumb.

#2

وهاذي ال codes

 

Private Sub cmdCalculate_Click(sender As Object, e As System.EventArgs) Handles cmdCalculate.Click
        'Declare
        Dim Quantity As Single
        Dim total As Single
        Dim cost1kg As Single
        Dim cost2kg As Single
        Dim cost5kg As Single
        Dim num1kg As Integer
        Dim num2kg As Integer
        Dim num5kg As Integer
        Const price5kg As Single = 10.5
        Const price2kg As Single = 6.3
        Const price1kg As Single = 3.8
 
        'Input
        Quantity = Val(txtQuantity.Text)
 
        'Process 
 
        num5kg = Quantity \ 5
        lbl5kgnum.Text = num5kg
 
ما عرفت اكمل بعد هاذي :(

مواضيع مشابهة