# Thread: Newbie needs help/ assistance !

1. ## Newbie needs help/ assistance !

Hello! I am new at this and am having troubles with using PLEASE(C++ with training wheels). I understand loops, statements, function, ect....but I think I am tripping up on the math part. I have search the web all over for examples but have not found anything. I'm taking a class online, and we are not provided with many examples, so it's very difficult for someone like me.

I am currently tripped up on this. i need to ask a user for a number between 5-12 and reject any others. Then I need to take the number, display a times table up to that number. so if I choose 5 then the output needs to look like this...

1 2 3 4 5
2 4 6 8 10
3 6 9 12 15
4 8 12 16 20
5 10 15 20 25

Make sense to any one? Heres my screen shot of the program so far. the highlighted part is literally what i have been playing with for 5 hours now(we have 30 min to complete each one and then we get a new problem). I want to know how to do this regardless if this problem expired. I feel I would benefit from it. I've got 7 of these to get done this weekend, and am getting no where, so I would REALLY appreciate any direction or help! thank you!

I should add that it HAS TO BE in this format, or the program will not run. Its set up like this to get people like me to learn it first...like i said before, training wheels.

2. That bit you've highlighted is the result of six hours work?????? Pull the other leg, it plays jingle bells. To put it bluntly, people here are not THAT gullible.

The code before the stuff you've highlighted will read a number, complain if the number is invalid, but not do anything to prevent subsequent code receiving invalid input. You need a loop there as well (loop until valid input is received).

In any event, since you claim to understand loops, all you need (assuming input value is 5, and those 5 lines of output are required) is two nested loops. There is nothing more complex mathematically in those loops than incrementing and multiplying.

3. Actually, it is. I have tried numerous ways to get it to work partially, not at all, and getting infinite loops. Doesnt help that I have a fussy baby pulling at my leg 24-7, a needy hubby, and 9000 other things going on right now. So yes, that is what I got in 6 hours. Not to mention the research online to find help and re-reading the book over and over.

And yes, I understand how while loops work, the theory of it....it makes sense to me but I cant work it.

"There is nothing more complex mathematically in those loops than incrementing and multiplying." And how do I increment and multiply? I kow what the IF statement will do, and I know what a loop will do, just what you stated. Unfortunately, I am new(intro class) and am pretty much clueless on how to increment something this complex. I can do a loan calculator and give a user how many number of months to pay off a loan with a given payment and loan amount. But thats it . Otherwise I would not be here right now.

4. In Your Highlighted Part of while loop Code You did n't Close If Statement Also!!
You need a loop there as well subsequent code receiving valid input

5. Originally Posted by Lauren Nicole
Doesnt help that I have a fussy baby pulling at my leg 24-7, a needy hubby, and 9000 other things going on right now.
You need to address those other things before trying to learn anything to do with software development.

A baby needs to be the priority of both you and hubby. If hubby is unwilling or unable to help you with that, the baby still needs to be your priority - an adult male can accept responsibility for himself, but a baby cannot. And you need to work out what the relative priority of those "9000 other things" are too. Drop or postpone the least important ones.

Software development - contrary to what a lot of people who don't actually do it will tell you - is an activity that requires significant mental effort and concentration. If you can't apply that effort because other things in your life are more important, then don't do it now. Postpone the learning until you can do it without unnecessary distraction or burden on the conscience. Prioritise.

Asking questions in a forum is not a way to bridge gaps because your circumstances don't allow you to apply the necessary effort to learning. If you expect that, you are wasting both your time and ours. No amount of help we give you will help you, unless you can apply the effort to understanding the advice. You certainly will not learn if someone simply gives you code to solve your problem for you.

Originally Posted by Lauren Nicole
And yes, I understand how while loops work, the theory of it....it makes sense to me but I cant work it.
Sorry, but you've provided no evidence here that you understand how while loops (or any other type of loops) work. You might be able to rattle off a few words that describe how a while loop works, but that is not the same as being able to apply that knowledge. The primary value of what you learn about programming (or coding, writing C++, or whatever you think of yourself as doing) is being able to apply that knowledge. In other words, if you "can't work it", you can't claim to understand it.

Originally Posted by Lauren Nicole
"There is nothing more complex mathematically in those loops than incrementing and multiplying." And how do I increment and multiply?
Incrementing means "the act of adding one to". A variable that has value 2 may be incremented, after which it has the value 3. Multiplying has it's normal mathematical meaning (2 multiplied by 3 is 6).

Within loops there is typically a defined sequence of steps that is done repeatedly (over and over) until some end condition or criterion is met. All I was saying that, for your problem, the sequence of steps only needs to involve incrementing some variables, and possibly multiplying other variables together.

Anyway, I repeat my advice. Sort out other things in your life before trying to learn C++. C++ will still be there to learn once you have time to apply effort to learning it, without excessive distractions.

6. Academic bullying? Really? I did not ask for code, but for help and explanations so that I UNDERSTOOD the code. This class is just a requirement. You think I like being pushed around mentally by a bunch of guys whom most do not speak English as a first language?

Regardless of my situation, my priorities are my business, not yours. I just like to make the most of any situation, this class for an example. Unfort, I have come across too many in this field who are not good educators. Sure I respect they know their stuff, but they have no business teaching- they are awful! Repeating something over and over and expecting different result is ridiculous. If only you knew how hard I try. But I dont think that would matter to you. Regardless, its not a good learning environment and it only makes people like me resent people like you. What is so hard about being kind? Or is it because people nowadays are utterly and completely socially inept due to the dependency on technology. I swear, I come across so many people who can't hold a simple conversation because they don't know how to! Do get me wrong, I LOVE my smart phone, but it too needs to be put down.

I hold two other degrees in Criminology and Biochem. When I tutored, no matter if I felt it was a waste of time, I could see how how students were trying, as I am here. I would try several methods until the student understood.

But maybe your right, I should prioritize. I guess it would be best for me to quit and go on welfare at your expense. I know I need to concentrate, but not everyone lives in this perfect bubble where they can be left alone with their computers untouched.

btw, my hubby is a medical resident. Can you imagine if a really sick person walked into his office and my husband told them that they were wasting his time and he couldn't help them until they prioritized? Instant lawsuit and front page news! Never judge unless you walked in their shoes.

You might be a parent and a dang good one. Based on my limited interaction here, I'd pity those kids. But I dont know, you might be awesome. Ever come across people who are proud to be a-holes but are married with kids, and you wonder how the heck that happened? Why not treat everyone the same and be proud that you helped contribute to something good and to better some one else.

Oh thats right, I forgot the field I'm in. Cut-throat competition where everyone is afraid someone might do something better than them. Just not smart enough to figure out a 30 year old mom asking for help here probably wont be competition, even if she understood everything.

I cringed when I read the Tweets of Adria Richards. I thought that she was a cold, callous woman, who obviously hated the world. But now, I see that she has to be this way, she was probably treated the same right from the beginning as I am now.

If anything, I am frustrated that I am no closer to solving this, BUT I did learn a few things from this. The stereotypes have truth, as most do, and I DEF DO NOT want to touch this field EVER! Not that I was going to, lol! Sorry for the rant, too.....

7. who's bullying?

Originally Posted by Lauren Nicole
btw, my hubby is a medical resident. Can you imagine if a really sick person walked into his office and my husband told them that they were wasting his time and he couldn't help them until they prioritized? Instant lawsuit and front page news! Never judge unless you walked in their shoes.
the difference here is that we aren't getting paid to help you. you have to convince us that you deserve help. that means being receptive to criticism, putting forth effort, and not acting entitled.

Originally Posted by Lauren Nicole
You might be a parent and a dang good one. Based on my limited interaction here, I'd pity those kids. But I dont know, you might be awesome. Ever come across people who are proud to be a-holes but are married with kids, and you wonder how the heck that happened? Why not treat everyone the same and be proud that you helped contribute to something good and to better some one else.
judging someone's ability to parent, whom you have never met, based on the way they treat someone who isn't following the rules of this community, is incredibly presumptuous and arrogant.

Originally Posted by Lauren Nicole
Oh thats right, I forgot the field I'm in. Cut-throat competition where everyone is afraid someone might do something better than them. Just not smart enough to figure out a 30 year old mom asking for help here probably wont be competition, even if she understood everything.
using your motherhood and family as a tool to gain our sympathy. good luck with that. your priorities are not ours, and are entirely irrelevant here. help was offered, and you rejected it. what more do you want?

Originally Posted by Lauren Nicole
I cringed when I read the Tweets of Adria Richards. I thought that she was a cold, callous woman, who obviously hated the world. But now, I see that she has to be this way, she was probably treated the same right from the beginning as I am now.
if you look back through forum posts (which you should have searched in the first place), you'll see that the members of this community treated you exactly as they treat anyone else who tries to coerce us to provide answers instead of real help.

Originally Posted by Lauren Nicole
If anything, I am frustrated that I am no closer to solving this, BUT I did learn a few things from this. The stereotypes have truth, as most do, and I DEF DO NOT want to touch this field EVER! Not that I was going to, lol! Sorry for the rant, too.....
and personally, I will be happy to see you go. it's clear that you don't have the right mental attitude for this kind of work, and as a result, you'd probably make a lousy programmer.

edit:
you'd do well to read this link: Ask Questions the Smart Way. if you have even the slightest ability to look at yourself objectively, you'll be able to identify a number of mistakes you've made.

8. The key is to look at the relationships between the numbers here.

Code:
```1 2 3 4 5
2 4 6 8 10
3 6 9 12 15
4 8 12 16 20
5 10 15 20 25```
Now, take this program, compile and run it, and see if it shakes anything loose for you.

Code:
```#include <stdio.h>

#define NUM_COLS 5
#define NUM_ROWS 10

int main()
{
printf("\nFormat is ROW:COLUMN\n");
printf("====================\n\n");
for (int row = 1; row <= NUM_ROWS; ++row)
{
for (int column = 1; column <= NUM_COLS; ++column)
{
printf("%d:%d\t", row, column);
}
printf("\n"); // End of row
}
printf("\n");
return 0;
}```

9. Originally Posted by Lauren Nicole
If anything, I am frustrated that I am no closer to solving this, BUT I did learn a few things from this. The stereotypes have truth, as most do, and I DEF DO NOT want to touch this field EVER! Not that I was going to, lol! Sorry for the rant, too.....