5 Replies - 401 Views - Last Post: 17 September 2019 - 03:52 AM Rate Topic: -----

#1 Criss.8549   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 15-September 19

Conversion project

Posted 15 September 2019 - 08:34 PM

Hi am new into coding i have homework assignment where i need to enter any money amount and get back how quarters, dimes, nickles, and pennies i have a textbox with the design name as txtAmount four label for each quarters dimes nickles and and pennies and 4 empty text labels with the desing name lblquarter and two buttons my question is how do i get started or did name my lbl correct i know you begin with dim after that is const but i don't get how get started my ex enter dollar amount $4.69 number of quarters 18 number dimes 1 number of nickles1 number nickles 1 number of pennies 4 if any one can help me or guide me i would really appreciate it thank you

Is This A Good Question/Topic? 0
  • +

Replies To: Conversion project

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15361
  • View blog
  • Posts: 61,607
  • Joined: 12-June 08

Re: Conversion project

Posted 15 September 2019 - 09:22 PM

Stop and think about it for a bit. Would it make sense (cents) to use 4.69 or would it make more sense to convert that to the lowest common type.. say.. pennies?

Then if you are counting something, like how many quarters you can remove from that pile of pennies, a loop would come to mind. In fact several!
Was This Post Helpful? 0
  • +
  • -

#3 Criss.8549   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 15-September 19

Re: Conversion project

Posted 16 September 2019 - 07:32 AM

Thank you i am new to coding and vb and i find it difficult to start at the be gaining
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15361
  • View blog
  • Posts: 61,607
  • Joined: 12-June 08

Re: Conversion project

Posted 16 September 2019 - 08:51 AM

@Criss.8549 - indeed. The first few steps are difficult, but think I gave you a pretty good idea on the key components and flow. How about you try.
Was This Post Helpful? 0
  • +
  • -

#5 Criss.8549   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 15-September 19

Re: Conversion project

Posted 16 September 2019 - 11:06 PM

So far this what i got i barely had time today to work on it i have manage work and school this my project and thank you for the help everyone in my class has some coding experience but me i am taking visual basics.

Private Sub BtnCon_Click(sender As Object, e As EventArgs) Handles btnCon.Click
Dim Amount As Decimal
Dim Quarters As Decimal
Dim Dimes As Decimal
Dim Nickles As Decimal
Dim Pennies As Decimal

Amount = CDec(txtAmount.Text)
Quarters = CDec(lblQuaters.Text)
Dimes = CDec(lblDimes.Text)
Nickles = CDec(lblNickels.Text)
Pennies = CDec(lblPennies.Text)



End Sub
End Class
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15361
  • View blog
  • Posts: 61,607
  • Joined: 12-June 08

Re: Conversion project

Posted 17 September 2019 - 03:52 AM

Yes, thats a start.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1