I need help please on this question and i could not understand where to begin.The question say, Input Calculate Circumfrunce Area of Circle. Value and surface area sphere. : Pi i = e Pi i square =theda 4/3 Pi i cube = V 4Pi i square = SA please, some give at least some sort of direction i'm just a starter in Visual basic. thanks guys.

Calculation in Visual Basic 2005 express
joostvaningen
It seems to me that you don't need to do any integration if I am reading your post correctly. In that aspect you can define as variable for Pi (not sure if this is already defined in Visual Studio) and the rest should work on it's own.
I would suggest that you have a textbox, where the user could input the radius of the circle, and a button that would handle your calculations.
Dim Pi As Const = 3.1415926...
Dim Circumference As Single
Dim Area As Single
DIm Volume As Single...(and all of the other ones as needed)
When the user clicks on the button then you can do all of your calculations:
Private Sub Button_Click(...)
Radius = val(textbox.text) 'This will turn the input from the textbox into a number
Circumference = ...
Area = ...
Volume = ...
End Sub
Hope this helps you start...
Omar Al Zabir
i'm covering a pillow. i know the diameter, 16". i couldn't remember the simple formula to measure the piece that goes around to attach the top to the bottom. a measuring tape you be to unseamly.
thx
EricN
sirck sirck
Well you'll have to EXCUSE me for not posting the correct code. I usually program as a hobby so I am not able to check my syntax on a compiler before I try to offer help.
IF you don't care enough to let me know you are writing from memory, if you appear to be presenting yourself as an authority, if you give the impression of accuracy and dependability when you aren't, if you are adding to disinformation without informing other of that possibility, I do not perceive that to be helpful.
We don't always remember syntax but we care enough about the people we are assisting to note that we are writing from memory. I see it as common courtesy. It's professional. When I have uncertainty, I say so and let people know they are receiving a guess, a well educated one but a guess never the less - a guess.
Chris Jiang
Dim Pi As Const = 3.1415926...
To my knowledge - this isn't VB (Net) syntax. It won't compile on my system.
Did you mean
Const Pi as Double = 3.1415926
Vipin.B
Although in principle, what you posted was right, it was wrong: it wouldn't compile. Because it is often very hard (impossible) to determine the skill or understanding of forum members asking questions, it's important that any answers are clear, consice and compile. In addition, there are a hundred or more people reading the post who may also be looking to understand and educate themselves. Non-compiling code may be OK for people who have a very good grasp of the language, but for beginners, it's leading them down blind alleys. Renee was not necessarily correcting you, but ensuring that those lurking don't go down one of those blind alleys: it helps us all.
That said, it's preferable to type the few lines of code into a VB application to make sure that what you intend to tell someone is actually correct. You also get syntax highlighting when you paste it into the forum (one reason I personally take whatever someone posts, that isn't highlighted, with a big pinch of salt).
Try and relax a bit.
Udi2000
I dare say both of you are responsible for the mistakes, either directly or indirectly.
acousticStrike: you are correct on giving hints, but it would be even better to actually compile (and test) your code first, no matter how trivial.
ReneeC: you should take a second look on saying acousticStrike being not helpful at all. If I am he, and I was helping without incentives, I'd feel insulted. He's helping by giving his guess... And you're right, it would be nice if everyone posted the correct code first time.
I'm a newbie here, I can't even use the quote feature. But that does not retract me from, say, guessing the correct code, since only MSDN Library has completely TRUE reference of all the codes you write. It's because coding is an interpretation of your logic mind, as long as it's logical, I think it's correct. Syntactical errors should be managed by the compiler, not your brain. That's why VS have a great feature called Intellisense.
acousticStrike: don't let this issue hold you back to help others.
ReneeC: given your post count (is it some sort of authority indicator ), I take it that you have been around the forum quite a while, and I take it that you KNOW many ppl aren't that good at remembering syntaces, like me.
Keep on rocking dudes!
P.S.: I think, declaration of Circumference, Area, and Volume As Single will create a compiler error when using Pi As Double or using Math.Pi. That's because Double operated by anything will result in a Double, not Single. My brain compiler says that, maybe your compiler had anything else to report
Mattsa
"The code that I provided was not meant to compile (it's just bits and pieces of the puzzle), because part of helping others is to show them the way TO the answer and not provide it for them. I understand that there are people out there who need an answer quick and fast but if you just give it to them then they are never going to learn anything."
Professionals here will, I'm writing this from memory, so take this with a grain of salt.
My response to your error was not the least bit confrontive and as far as I know the convention is that unless otherwise noted, assume it will compile. As SJ says, there are all levels of expertise here.
"However, I have seen some of Renee's other posts that clearly insult other people and I think it's rude and unprofessional."
I don't believe you can show me a single post where I have ever insulted anyone on this board.
Numbers
Take this post for instance:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=201337&SiteID=1
The fact that this was a VB forum and this person posted in C# should have nothing to do with it. You being the "professional" should have walked away and been the bigger person instead your response was,
"Eeeeeeeeeeeeeeeeeeeeeewwwww
Ugly, ugly ugly...."
Keith Henkel
MMA_man
Point well taken and I understand what you mean. I consider myself a beginner and I think that we can all stand to learn a thing or two from others. However, I have seen some of Renee's other posts that clearly insult other people and I think it's rude and unprofessional.
The code that I provided was not meant to compile (it's just bits and pieces of the puzzle), because part of helping others is to show them the way TO the answer and not provide it for them. I understand that there are people out there who need an answer quick and fast but if you just give it to them then they are never going to learn anything.
As I tried to say before, coming to this post is the first sign of needing help from others. When I try to help others I am curtious and when I get help from others I am thankful. It was a simple typo and an MS graciously corrected me on something that I had already mentioned that I was unsure of...
tonemeister
Context, Context Context.
And thread Drift...
Barb O
I'm soooooo sorry, I totally forgot that I was supposed to let you, ReneeC, know that I wasn't an "authority" on the message board. People come to this message board for help, because unlike you, we are not perfect...
If you're such an authority figure when it comes to VB then you should at least know how to be curtious when it comes to addressing a mistake. Here's your first lesson (and I won't even charge you for it):
Scenario: While trying to help a fellow programmer an individual makes a syntax error.
Incorrect Resolution: Hey, jackass! I feel better as a person when I belittle someone. You're code is wrong, the CORRECT and only way to do it is like this... ohhh and by the way I am queen of the VB world because I have over 1000 posts, etc...
Correct Resolution: The correct way to declare a constant is... or as the REAL authority on the subject stated, "You can use Math.PI for that value rather that defining your own constant."
If you would have read more carefully, I did tell this individual that I wasn't sure if Pi was already defined in Visual Studio... Bottom line is that someone asked for help and I did my best to try and help. They were thankful and I would try to help again if I thought my comments would point them in the right direction.
Jim Fox