Jump to content



Photo

SumNumbers in VB.NET


  • Please log in to reply
23 replies to this topic

#1 Jane Lewis

Jane Lewis

    Neowinian

  • Joined: 05-February 14

Posted 05 February 2014 - 21:06

Okay I'm having the toughest time trying to figure out how to do this program. I started but I need help finishing it, figuring out what else I need.

 

The Prompt is:

Create a SumNumbers application that calculates the sum of a range of numbers entered by the user and displays in a label an expression with the numbers in the range.

 

For example, if my starting number is 26 and my ending number is 30, then in the lblMessage box it will display 26+27+28+29+30 = 140,

 

Also I have to use an If... Then.. Else structure within a For Next Loop. And she gives us an Hint:(Use the &= counter operator in this program.

HELP ME PLEASEEE!!!!!!  

 

THERE'S A PICTURE OF THE PROMPT ATTACH, USE IF YOU DON'T UNDERSTAND WHAT I WAS TRYING TO SAY(lol)

Attached Images

  • vb.png



#2 +Nik L

Nik L

    Where's my pants?

  • Tech Issues Solved: 2
  • Joined: 14-January 03

Posted 05 February 2014 - 21:10

Asking people to do your homework in 2 different threads?



#3 Grunt

Grunt

    Golden Boy

  • Tech Issues Solved: 1
  • Joined: 11-March 02
  • Location: Scotland

Posted 05 February 2014 - 21:12

This looks like homework. We're not here to do your homework for you.

Perhaps pay attn in class and read the material.



#4 LaP

LaP

    Forget about it

  • Tech Issues Solved: 4
  • Joined: 10-July 06
  • Location: Quebec City, Canada
  • OS: Windows 8.1 Pro Update 1

Posted 05 February 2014 - 21:15

This looks like homework. We're not here to do your homework for you.

Perhaps pay attn in class and read the material.

 

Specially since this is a really really really easy one ...



#5 Geoffrey B.

Geoffrey B.

    LittleNeutrino

  • Tech Issues Solved: 11
  • Joined: 25-July 05
  • Location: Ohio
  • OS: Windows 8.1u1
  • Phone: Nokia Lumia 928 WP8.1u1

Posted 05 February 2014 - 22:59

After speaking with the OP I have unlocked this thread. They are not looking for a complete answer and are just having problems getting the number range to appear at the bottom as in the example.

#6 Andre S.

Andre S.

    Asik

  • Tech Issues Solved: 11
  • Joined: 26-October 05

Posted 06 February 2014 - 01:26

What have you tried so far? Where are you stuck on? Do you have an idea how to get the input numbers? Generate the string? Display it on the form?



#7 Andre S.

Andre S.

    Asik

  • Tech Issues Solved: 11
  • Joined: 26-October 05

Posted 06 February 2014 - 17:27

There are so many different ways you can do this...I just thought this up in a minute.

You just completely defeated the point of the homework, congratulations.



#8 riahc3

riahc3

    Neowin's most indecisive member

  • Tech Issues Solved: 11
  • Joined: 09-April 03
  • Location: Spain
  • OS: Windows 7
  • Phone: HTC Desire Z

Posted 06 February 2014 - 17:29

Hello,

You just completely defeated the point of the homework, congratulations.

I disagree: Learning from one example can benefit in the long run. Once he understand this excerise, maybe the next one wont be so difficult.

Of course, if he asks 2 or 3 more problems, we cant do them all!

#9 Andre S.

Andre S.

    Asik

  • Tech Issues Solved: 11
  • Joined: 26-October 05

Posted 06 February 2014 - 17:30

Hello,
I disagree: Learning from one example can benefit in the long run. Once he understand this excerise, maybe the next one wont be so difficult.

Of course, if he asks 2 or 3 more problems, we cant do them all!

But now he doesn't have to learn, he can just copy-paste and hand it in. The point of the homework is figuring something out by yourself. Don't provide complete working solutions to vague requests for help.



#10 riahc3

riahc3

    Neowin's most indecisive member

  • Tech Issues Solved: 11
  • Joined: 09-April 03
  • Location: Spain
  • OS: Windows 7
  • Phone: HTC Desire Z

Posted 06 February 2014 - 17:35

Hello,

But now he doesn't have to learn, he can just copy-paste and hand it in. The point of the homework is figuring something out by yourself. Don't provide complete working solutions to vague requests for help.

Homework is a dumb concept. Pick any subject you did in class that you didnt like and you dont dedicate to now and see how that has helped you.

If you wanna learn, we can look it up ourselves. Half of the things we have learned in live we have had to look it up.

I know my work had NOTHING to do with ANYTHING I did at school. I just got here, buscted my ass, and learned it because I wanted to and I wanted to get paid.

I dont agree personally with the homework but I wont do everything he asks just to pass. For one time its done I dont think we are going to ruin his studing processes (if he really wants to program)

 

Also at the end of the day, if its been asked, its probably been programmed already. So he would have found a answer, copy/pasted it anyways...

 

If he wants to get started, I gave him a great example. If he doesnt, hey, his lost but dont expect another answer for me/us.



#11 +LogicalApex

LogicalApex

    Software Engineer

  • Tech Issues Solved: 8
  • Joined: 14-August 02
  • Location: Philadelphia, PA
  • OS: Windows 7 Ultimate x64
  • Phone: Nexus 5

Posted 06 February 2014 - 17:42

Hello,

Homework is a dumb concept. Pick any subject you did in class that you didnt like and you dont dedicate to now and see how that has helped you.

If you wanna learn, we can look it up ourselves. Half of the things we have learned in live we have had to look it up.

I know my work had NOTHING to do with ANYTHING I did at school. I just got here, buscted my ass, and learned it because I wanted to and I wanted to get paid.

I dont agree personally with the homework but I wont do everything he asks just to pass. For one time its done I dont think we are going to ruin his studing processes (if he really wants to program)

 

Also at the end of the day, if its been asked, its probably been programmed already. So he would have found a answer, copy/pasted it anyways...

 

If he wants to get started, I gave him a great example. If he doesnt, hey, his lost but dont expect another answer for me/us.

That sounds good, but the reality is you can't be a good programmer without understanding basic problem solving. He came here because he obviously couldn't easily Google the answer otherwise why wait hours for a forum reply?

 

He came here for the quick drop. Copy paste his homework in and someone else will do all the work. You gave him that victory...

 

If you truly want to help you have to enable him to be a better problem solver and not to seek quick solutions without understanding what they are doing.



#12 +LimeMaster

LimeMaster

    LippyZillaD Council ( ͡° ͜ʖ ͡°)

  • Tech Issues Solved: 4
  • Joined: 28-August 10
  • OS: Windows 8
  • Phone: Nokia Lumia 920

Posted 06 February 2014 - 17:48

But now he doesn't have to learn, he can just copy-paste and hand it in. The point of the homework is figuring something out by yourself. Don't provide complete working solutions to vague requests for help.

I'd just like to point out that the OP had figured out eight of those questions on his own, so it's no big deal if he gets help with one question? :)



#13 Andre S.

Andre S.

    Asik

  • Tech Issues Solved: 11
  • Joined: 26-October 05

Posted 06 February 2014 - 17:50

I'd just like to point out that the OP had figured out eight of those questions on his own, so it's no big deal if he gets help with one question? :)

I'm not opposing providing him with help; I'm saying that providing something that he can just hand in is not help.



#14 +LimeMaster

LimeMaster

    LippyZillaD Council ( ͡° ͜ʖ ͡°)

  • Tech Issues Solved: 4
  • Joined: 28-August 10
  • OS: Windows 8
  • Phone: Nokia Lumia 920

Posted 06 February 2014 - 18:09

I'm not opposing providing him with help; I'm saying that providing something that he can just hand in is not help.

OK, but he'll probably still have to study the code to figure out how it works as teachers tend to want you to explain how you got your answer. Also, the code is not one hundred complete as it's missing the textbox, button and label controls, which he'll have to code in manually.



#15 Denis W.

Denis W.

    The True North!

  • Tech Issues Solved: 6
  • Joined: 06-March 05
  • Location: Toronto, Ontario [CA]
  • OS: Windows 8.1 Pro and OS X Mavericks
  • Phone: iPhone 4S

Posted 06 February 2014 - 18:18

Sorry but I'm going to step in and hide the post containing the full solution.

 

Sure, homework is useless since everyone ends up with more or less the same solution. That's not the point though - you need to learn how to get there somehow. Posting small code snipplets of how you would implement a difficult algorithm is fine if that's only a small part of the solution. Posting the entire solution is a no-no. Plus, if the OP is in post-secondary studies there are academic policies that we don't want the OP to run afoul of.