For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
Anything not in the foreground, is considered as being in the background.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
Ask Away!. But maybe before you do, take a look at some of the threads posted here, and some of the questions and replies in the Quick Answers section. We don't do you work for you, but we're willing to help you with issues you may have. So questions like "why does this program produce unexpected results", or "why doesn't this compile" are likely to get answers. So are questions like "I'm trying to do X. Should I use a vector or a list?." But questions that ask "Implement a linked list, insert some values, sort and print the list", with no indication that you've made any attempt to solve the question yourself are likely to be either ignored or get a "We don't do homework" type of reply.
Well, aside from asking this exact question again (ok, you might ask it again to assert that VN and/or K5 is/are NOT robots I guess), use keywords in your PROGRAM by typing them into the "search" here at CP. The Discussions are titled and the QA is tagged. So keep those two things in mind also.
c ++ who can show me the direction of this article. There is an undirected star graph consisting of nodes labeled 1 to n. A star graph is a graph in which there is a central node and exactly n - 1 edges connecting the central node to every other node.
You are given a 2Dedges integer array where each edge edges[i] = [ui, vi] indicates that there is an edge between the nodes ui and vi. Returns the center of the given star graph.
Input: edges =
Ok, so it appears the rules of this game are:
- If a number is a perfect square, take its square root
- if a number is divisible by 3, divide it by 3
- if a number is divisible by 2, divide it by 2
- otherwise, subtract 1.
So, given an input of 32, we'd go 32 -> 16 -> 4 -> 2 -> 1 -> 0 for 5 steps.
and given 75, we'd go 75 -> 25 -> 5 -> 4 -> 2 -> 1 -> 0 for 6 steps.
Now, what problem are you having? A quick glance over the code didn't show any obvious errors.
Your checkSquareNumber() and squareNumber() functions are quite inefficient. You'd be better off googling a better square root algorithm (or just using the library sqrt() function). Ad since they are doing the same thing, they could be combined (return -1 if it is not a perfect square, and you can replace the two calls with one)
i am having problem with my code. where the first condition to check if the original number is a perfect square. can you point out where my error is or point me to a better direction for this problem. i am trying to count the minimum number of steps to convert any number to 0
If you are not happy with the output produced by your code, then you should post here an example of input data (i.e. the sarting value of num), together withe the expected result. Otherwise, how could we possibly help?
"In testa che avete, Signor di Ceprano?"