Jump to content



Photo

create if...elseif statement Visual basic

visual basic vb

  • Please log in to reply
58 replies to this topic

#1 soccerstar206

soccerstar206

    Neowinian

  • Joined: 19-August 13

Posted 24 August 2013 - 03:17

Write an If..ElseIf  statement (or Select Case if you prefer) given the following:

 

decTicketPrice                    ‘ticket price

intAge                                  ‘age of customer   

 

If customer's age is less than 6, ticket price is Free

 

If customer's age is 6 to 12, ticket price is $3.50

 

If customer's age is 13 to 19, ticket price is $4.50

 

If customer's age is over 62, ticket price is $5.50

 

Otherwise, ticket price is $7.50




#2 +GreenMartian

GreenMartian

    Neowinian Senior

  • Joined: 28-August 04
  • Location: adelaide, au

Posted 24 August 2013 - 03:20

Do the teachers these days throw assignments at students without teaching them anything, nor equipping them with textbooks?



#3 ncc50446

ncc50446

    Engage!

  • Tech Issues Solved: 1
  • Joined: 09-January 04
  • Location: Saskatchewan, Canada
  • OS: Fedora 18/Windows 7
  • Phone: Android AOKP 4.0.4

Posted 24 August 2013 - 03:22

Do the teachers these days throw assignments at students without teaching them anything, nor equipping them with textbooks?

I'm sure they do, but the student would need to pay attention...But, why pay attention when all you have to do is ask on a forum?



#4 Lord Method Man

Lord Method Man

    Neowinian Senior

  • Tech Issues Solved: 1
  • Joined: 18-September 12
  • OS: Windows 8.1 Pro
  • Phone: Nokia Lumia 520

Posted 24 August 2013 - 03:24

http://www.neowin.ne...#entry595899343

 

Are you going to post all of your homework assignments here?



#5 OP soccerstar206

soccerstar206

    Neowinian

  • Joined: 19-August 13

Posted 24 August 2013 - 03:24

Do the teachers these days throw assignments at students without teaching them anything, nor equipping them with textbooks?

especially online programming class.

 

soo...bout the question?



#6 OP soccerstar206

soccerstar206

    Neowinian

  • Joined: 19-August 13

Posted 24 August 2013 - 03:26

http://www.neowin.ne...#entry595899343

 

Are you going to post all of your homework assignments here?

 

nah just the ones I need help on



#7 Grinch

Grinch

    Developer

  • Tech Issues Solved: 4
  • Joined: 26-September 09
  • Location: Wisconsin
  • OS: Windows 8.1.1 | WP8.1
  • Phone: Nokia Lumia 925

Posted 24 August 2013 - 03:28

Google would show you quite clearly how to do If and ElseIf statements in VB.NET just so you know. MSDN is a great resource as well, I came to learn this rather quickly. As for your question;

http://msdn.microsof...y/752y8abs.aspx

#8 OP soccerstar206

soccerstar206

    Neowinian

  • Joined: 19-August 13

Posted 24 August 2013 - 03:30

I do know how to do them I just need to do them quickly and I take awhile when I write my code



#9 firey

firey

    F͎̗͉͎͈͑͡ȉ͎̣̐́ṙ͖̺͕͙̓̌è̤̞͉̟̲͇̍̍̾̓ͥͅy͓̍̎̌̏̒

  • Tech Issues Solved: 5
  • Joined: 30-October 05
  • Location: Ontario, Canada
  • OS: Windows 7
  • Phone: Android (4.1.2)

Posted 24 August 2013 - 03:32

what we need to start doing is writing the most convoluded and syntatically poor way of answering the homework questions as possible.  And whenever someone asks for help we need to write something that the teacher would look at and say WTF.



#10 Grinch

Grinch

    Developer

  • Tech Issues Solved: 4
  • Joined: 26-September 09
  • Location: Wisconsin
  • OS: Windows 8.1.1 | WP8.1
  • Phone: Nokia Lumia 925

Posted 24 August 2013 - 03:33

I do know how to do them I just need to do them quickly and I take awhile when I write my code


Wouldn't it be better to learn how to do it more quickly yourself rather than having others write it up for you? How do you intend to function in job that revolves around this language? You can't just turn to your co-worker and say "Hey could you write up this elseif statement for me?".

#11 OP soccerstar206

soccerstar206

    Neowinian

  • Joined: 19-August 13

Posted 24 August 2013 - 03:34

Wouldn't it be better to learn how to do it more quickly yourself rather than having others write it up for you? How do you intend to function in job that revolves around this language? You can't just turn to your co-worker and say "Hey could you write up this elseif statement for me?".

 

Im taking this class for fun and credits



#12 Grinch

Grinch

    Developer

  • Tech Issues Solved: 4
  • Joined: 26-September 09
  • Location: Wisconsin
  • OS: Windows 8.1.1 | WP8.1
  • Phone: Nokia Lumia 925

Posted 24 August 2013 - 03:37

Im taking this class for fun and credits


Either way you should still learn to do it yourself. No one is going to write up your code for you. In the time you've sat here and tried to get someone to do so you should have been able to write it up yourself which even if it is slow, you improve with each time you do it. It becomes more second nature to you.

Ask to learn, not to be lazy.

#13 +Karl L.

Karl L.

    xorangekiller

  • Tech Issues Solved: 15
  • Joined: 24-January 09
  • Location: Virginia, USA
  • OS: Debian Testing

Posted 24 August 2013 - 03:46

It's also important to remember that when you post a question you are asking volunteers to spend their free time trying to help you. Most of the time people don't mind doing that - it is why the majority of us joined Neowin after all - but posting mundane questions that you could easily lookup in your text book or elsewhere online feels like abusing those same people's good will. Not to mention the fact that posting many of this type of question in a short time period is likely to burn people out. As others have already offered, I would be happy to offer my advice to help you solve, and more importantly understand, a nontrivial programming problem, but just seeing the sheer volume of these threads you have posted in the last week has already made me leery of investing my time.



#14 Kalint

Kalint

    Neowinian Senior

  • Tech Issues Solved: 2
  • Joined: 16-January 07

Posted 24 August 2013 - 03:52

Is your teacher the same one who issues a programming assignment with fill in the blank spots?



#15 adrynalyne

adrynalyne

    Neowinian Senior

  • Joined: 29-November 09

Posted 24 August 2013 - 04:08

Fill in the blank coding... Is that even real? LOL.



Click here to login or here to register to remove this ad, it's free!