Sorry, the value of Count BEFORE I start my loop is 0 .
It increments to 10.
I initialized it as 0 .. while declaration
Ahhh, yes. So you did. Sorry...
Sorry, the value of Count BEFORE I start my loop is 0 .
It increments to 10.
I initialized it as 0 .. while declaration
Ahhh, yes. So you did. Sorry...
This is a forum of computer geniuses, not math geniuses. There is lots of help on the web to do what you want to do.
Why does that haunt you? It will mean starting the code over, but you already know how to do a lot of it thanks to the code you posted.
Input n
Use a loop from 0 to n-1 to output your n rows.
Inside that, use another loop to output your n columns.
There's your board.
Get that part working.
You may have meant your post that way but obviously that's not what your post said to us. And if we're pricks for misreading your ambiguous phrasing, so be it.
Miscommunication doesn't start with the listener.
If you'd like me to break down your post to show you how and why I misinterpreted it, I will. I'm sure you won't want me to, but the offer is there...
What's the purpose of entering the Highest and Lowest?
The way my question is actually set up, is that I have 3 topic I should present questions on. One question bank may have more questions than another, therefore by using Highest and Lowest I can increase the range of questions to choose from for each section.
If you say so. It doesn't make sense to me, but as long as you understand it...
Look again. Find an explanation about "C string arrays". I found a couple while barely looking.
On this forum ? ...
Maybe, but not necessarily.
By the way, what is the value of Count before you start your loop?
10 . So 10 questions total for each section. As I said, Highest & Lowest variables increase the range of possible 10 questions to choose from.
Not in the code you posted it isn't.
Does what you have work? That's your first step. Don't try writing the whole thing at once.
Get LoadArray()
working well first. Output the entire array at the end of main()
And use CODE tags.
excuse me, but your crossing the line. What gives you the right to break the thread without my permission and give it your own title? My post comes first here right? then it should be my thread! You have misused power. Thats what you do. I've noticed!
never mind. I get it! Your showing your maturity here. ok uncle. I get the whole picture. Funny thing is your creating fights with a younger guy. Shows how much you've grown up! Get a life *snip*
If you really think so, PM Happygeek, Narue, or CscGal. Voice your displeasure. Try a couple other Mods, too.
I can't be any fairer or less *snip*ish than that.
Post their member number here. Then we can find his head with the 2x4.
excuse me, but your crossing the line. What gives you the right to break the thread without my permission and give it your own title? My post comes first here right? then it should be my thread!
If you wish to see the original thread, it is here. The first post here came immediately after the 5th post (mine) in the other thread.
1.If I'm supposed to have an array to hold the cards for each player. How do I add the first two cards I printed added to each of the 7 arrays.
1) If you need the first element of array[10] to be a 3, how would you do it? Write the statement: ____________________
2) What is the first thing you printed out after the shuffle? Write the thing: _________
3) Why can't you simply change the 3 above to the thing?
2.Another_Card() function is supposed to ask the player if they want another card. if they say yes another card is added to that player's array. How do I do this if I cannot use the switch statement more than once?
What makes you think a switch() is necessary?
Have you heard of IF statements?
I also uploaded the .exe that my program is supposed to look like
Don't care. Not going to run .exe files I don't know about. Too much can go wrong. Don't want no gotcha's
Sounds like you need to learn some coding techniques. "just throwing codes together" rarely results in a working program. And "I believe I have the function that inputs the trapezoidal rule correctly" is also a recipe for disaster. If you don't...
Questions:
1) Can you solve the equations by hand?
a) If not, you need to figure this out. You can't program what you don't know.
b) If so, write down the steps (in words) you take to solve it.
This is partially where your [I]code[/I] comes from.
2) Can you test your function with known values that have a known answer?
a) If not, you will never be sure if it's right or not.
b) If so, good. Do it.
Test as many possibilities as you can. They [B]all[/B] must work
Problem: I need an array to hold the cards and an array to calculate the total
So what's the problem? What is it you don't understand?
It doesn't seem that tough but I was instructed to only use the switch(num) statement and shuffle code once in the program.
It really isn't. That's why we need to know what the problem you're having is.
Refer back to the link I included with this post, Colored in Green Above.
Rather not. Post the part you're having trouble with if you really think we need it and you can't explain it yourself.
Threads don't close unless they cause problems. But when you finish your task it's proper to "Mark this Thread as Solved", above the reply box.
Is the following easier to read?
Much!!
Hey all. I'm trying to get the FindDaysOver function to grab the avg result from the CalcAvg function result in main. What am I doing wrong?
Nothing that I can see.
Thanks to your formatting your code is extremely difficult to read. I can't even find FindDaysOver()
Reformat using this link and repost.
In conclusion, I would like all aspiring programmers to listen to what this wise student professed about programming as it will help people like me greatly.
You bet. Fewer people that know what they're doing makes it easy for us that do. I love your reverse psychology!
Don't know. You didn't tell us.
No. We have a 1 in 50 chance of picking the correct line the error is on.
OK OK Enough already!! I think we've got it!!!!
[boilerplate_help_info]
Posing requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] missed:
[list=1]
[*]Ask a question that can be answered. Do not ask
- What's wrong with my code?
- Why doesn't this work?
- Anything else that does not give us useful information
[*]Post your code. If we don't know what you did, how can we possibly help?
- Use [b]PROPER FORMATTING[/b] -- see this
- Use CODE Tags so your formatting is preserved.
If we can't follow your code, it's difficult to help. We don't care that you're still working on it. If you want us to read it, it must be readable
[*]Explain what the code is supposed to do. If we don't know where the target is, how can we help you hit it?
[*]Explain what actually happened! If we don't know where the arrow went when you shot it, how can we tell what went wrong and how far from the target you are?
[*]If you have errors, post them! We can't see your screen. We can't read your mind. You need to tell us what happened.
[*]Do [b]not[/b] ask for code. We are not a coding service. We will help you fix your code.
If anyone posts working code for you, they are a …
So I've played around with this code a few times.
I now see how to successfully manipulate this code.
It doesn't seem to always work, but I suppose its fine.
Oh no, another "mediocre is good enough" programmer? Please change that attitude now. If a program doesn't work always, it's a bad program.
Would you like it if your bank used software that works most of the time?
I entered the Highest as 20 and the lowest as 1.
What's the purpose of entering the Highest and Lowest?
Also, I am sort of familiar with Arrays, but how is it that you label arrays so that it calls one with a questino ? I was searching but I can't find any web pages. Could you explain or provide me with one ?
Look again. Find an explanation about "C string arrays". I found a couple while barely looking.
By the way, what is the value of Count before you start your loop?
Moved because it was completely unhelpful to the thread posted in, and really needs to be seen by as many people as we can manage -- esp. those that hire programmers.
3 resurrections of this zombie is enough!
Try reading each character instead of the whole line. Then when you read the | or \n you can do your special magic.
Make 2 IF statements so it's more readable. If month { if day }
Or put the number of days in an array and a simple
if (d <= MonthDays[m])
makes the job painless and readable.
Seriously, what is the difference between calling time()
on Unix vs Windows? What is it you are really looking for?
i would like to change my username to : kirkspock952035
Oh please! No!!!
catalog[x,0]
is not how you specify a 2D array.
1 Read a number. Save it.
2 Read another number.
3 Is it the last number?
4 if not save it and go back to 2
5 if so subtract this number and the saved one
The page you posted not only explains it, but gives you an example. Type the example in. Run it a few times. Change the srand() parameter to something else. Run it a few time.
In other words, if you don't know how something works, find an example (you did) and play with it until you understand it.
You can remove the define and replace the word NUMBERS with 5 through out program to make it purely for evaluating lowest of 5
:icon_rolleyes:
Yes you can. But going from a useful, good coding practice that makes further development easy to hardcoded, poor coding practice that makes further development hard does not sound like a good idea. Any reason why you would recommend such a move?
The first index needs to be specified: string catalog[5][] = {...
Maybe you need to clarify what you mean by Unix Time. AFAIK, time is time. What are the differences you know that we don't?
i have made the code which sort the unsorted array from even to odd but i am confused how to check the either it is sorted or not i have made the programe which can sort any array from even to odd numbers but how to check either it is sorted from even to odd or not. may be it simple task but i do not know how to do that kindly help me .
i tried i asked 3 questions you did not answer them if you dont answer them i dont know what you are able to do and it makes it hard to help when someone asks you a question you need to answer it not ignore it otherwise we dont want to help anymore anso when you learned english did you happen to hear about things called sentences please use them
that all depends on what the errors are since you didnt bother to tell us what they are we dont know what to look for you cant just drop code on us an say fix it you have to xeplain what the problems are because we arent compilers were human
Do you know how to
1) check if a value is even or odd?
2) check if one value is < or > the next number?
3) move through an array from one number to the next?
Yes. Search the web for "VB6 autofill" and you should find some examples. It's relatively complicated.
Hello!
I wanna ask you guys for help with this program. Here is my problem explanation: I want that user gives an input in the beginning of the program how big should tictactoe board would be. For example: input: 4 so board would be 4x4.
Code of the current problem is:
Lots of uncommentted code
Thanks for the help in advance.
Help with what? A problem statement and code does not explain the problem you are having.
And Greywolf333 is almost correct. While you do not need dynamic arrays, you really do need arrays.
There are no records in the notepad. Notepad is a binary executable file -- a program. It contains no data.
It's not the default. The default is blank. It just so happens to be the first item in the list though.
Then change it to Spammer. The bots will grab it and we'll know. A human won't and he'll be safe.
I think that most accounts are in stealth mode for a couple of months before posting, right??? Not really sure, it's not something we have the ability to track.
Another question, then:
What benefits do stealth (non-contributing) members have that non-members don't have? Is there a reason to sign up if one isn't going to post? From the member's and community standpoint, not the business standpoint.
[boilerplate_help_info]
Posing requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] missed:
[list=1]
[*]Ask a question that can be answered. Do not ask
- What's wrong with my code?
- Why doesn't this work?
- Anything else that does not give us useful information
[*]Post your code. If we don't know what you did, how can we possibly help?
- Use [b]PROPER FORMATTING[/b] -- see this
- Use CODE Tags so your formatting is preserved.
If we can't follow your code, it's difficult to help. We don't care that you're still working on it. If you want us to read it, it must be readable
[*]Explain what the code is supposed to do. If we don't know where the target is, how can we help you hit it?
[*]Explain what actually happened! If we don't know where the arrow went when you shot it, how can we tell what went wrong and how far from the target you are?
[*]If you have errors, post them! We can't see your screen. We can't read your mind. You need to tell us what happened.
[*]Do [b]not[/b] ask for code. We are not a coding service. We will help you fix your code.
If anyone posts working code for you, they are a …
Why don't you change PoolSize()
to return gallons?
Change it to "I am a Spammer"!!!! They obviously just choose a default. And a human would change it.
Question:
What's the average time from creating the member to the actual spam post? At least for any posts that are not done during the registration session?
Could be. There's not enough info to tell. Need to know how the variables are defined and declared.
"Executive (C-level)" seems to be a default value of some kind. I can't see anyone actually typing that in, but some valid members have that phrase in their info.
"Man" on the other hand is a spammer. I haven't seen one valid member with it.
Hello again. Well, I've been trying to get this to work, and I finally was able to combine two functions into one,
Why would you want to do that? Each function had it's individual purpose - leave it at that. A function should do one thing. In your case, one should calculate the volume, one should calculate the capacity.
That's you biggest problem. Split them apart again, and your task is very simple.
OK, it's time for the
[boilerplate_help_info]
Posing requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] missed:
[list=1]
[*]Ask a question that can be answered. Do not ask
- What's wrong with my code?
- Why doesn't this work?
- Anything else that does not give us useful information
[*]Post your code. If we don't know what you did, how can we possibly help?
- Use [b]PROPER FORMATTING[/b] -- see this
- Use CODE Tags so your formatting is preserved.
If we can't follow your code, it's difficult to help. We don't care that you're still working on it. If you want us to read it, it must be readable
[*]Explain what the code is supposed to do. If we don't know where the target is, how can we help you hit it?
[*]Explain what actually happened! If we don't know where the arrow went when you shot it, how can we tell what went wrong and how far from the target you are?
[*]If you have errors, post them! We can't see your screen. We can't read your mind. You need to tell us what happened.
[*]Do [b]not[/b] ask for code. We are not a coding service. We will help you fix your code.
If anyone posts working …
Hi everyone!
Hi there!!!
This is my first post and ...
Really? I wondered what that 1 posts meant under your name! How 'bout that!
... i'm also a newbie so don't be harsh on me!
Why not? If your question is lame you deserve it. If your question is well thought out, you don't... :icon_wink:
I have this exercise to do which asks pretty much what the title says.
Don't use the TITLE as your question. Post the question and all pertinent details in the post. By the way, that was a very good title. +2 points!
I have a function that reads strings from a file and puts them in an array. Then I insert from the keyboard a new string to the same array and I have a second function where it tries to sort them alphabetically.
I managed to write down a version of the code, using bits and pieces, without really understanding what I'm writing. Here it is:
Code tags! First post! +10 points!!! :)
Unfortunately, that's where you left it.
If you don't understand what you are writing, you should not be writing code. You need to sit at a desk with pencil and paper and plan -- yes plan -- what you need to accomplish.
Write down what the task is.
Break that description into pieces -- like in English class, what are the nouns, verbs, and the implied parts (but don't really look for …
Your FOR loops are completely wrong
for (a=1; ktr<11; ktr++) // you start A at 1 but use KTR as the loop index
{
if(a%2==0 || a%3==0 || a%5==0)
{
System.out.print(a + " ");
ktr++; // you already do this in the FOR loop
}
a--; // you decrement A and use it to exit
if (a>4) {break;} // the loop but that's what the KTR<11
// is supposed to do in the FOR loop
// Also, you start A at 1 and decrement,
// so how does it get to 4?
}
The other loop (the bolded one)
for (a=1; ktr<11; ktr++) // you start A at 1 but use KTR as the loop index
{ // You never use initialize nor use KTR
if(a%3!=0 && a%5!=0 && a%4!=0 && a%2!=0 && a%7!=0 || a==2 || a==3 || a==5)
{
System.out.print(a + " ");
}
a--; // you decrement A and use it to exit
if (a<1){break;} // the loop but that's what the KTR<11
} // is supposed to do in the FOR loop