consider a vector R whose coordinates xyz are given by R1,R2 AND R3.the length of the vector R is calculated as R len=squareroot of R1Squared+R2squared+R3squared.write a c++ program to prompt the user for the vector coordinates values and calculate and display the vector R length.please help me with the code of this..thanks in advance.

Consider a forum meant to assist programmers in learning to program, but whose members are constantly bombarded with requests from students who want their homework done for them with no effort on their own part. Explain why it is counterproductive to both the members and the students for the members to acquiesce to such requests, or conversely, provide some proof (e.g., partial code for the project) that the student has made their own effort on the assignment and is legitimately seeking help rather than a hand-out. Extra credit: Demonstrate the likelihood of being caught at cheating by the professor's TA, just from doing a script-driven Google search on fragments of the submitted code from each student.

commented: Original :) +15

its totaly upto the programmer whether to spoonfeed the student by providing full code.or help the student with a similar code for practise and guidance.or help on how to go about it.

While this is true, the fact is, you didn't ask for help with a specific issue; you simply gave us the problem statement and a plea for assistance, without any indication of what kind of difficulty you were having with it. You also showed no evidence of your prior effort, which is directly contrary to both the letter and the spirit of the forum rules, which state:

Do provide evidence of having done some work yourself if posting questions from school or work assignments

While my reply was perhaps unnecessarily snide, the point remains: we need you to show us what you have tried to do so far, and tell us what you are stuck on, so we at least know how to try and help you.

In order to give any help at all, we would at the very least have to know how you are representing the vectors (as a three-element array, for example, or as a class or struct, or even as disconnected floating-point variables - hopefully not the latter, but it is a possible representation), and whether you had any functions or methods to operate on that representation already written.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.