janice4928
New member
- Joined
- Oct 1, 2016
- Messages
- 1
Hi.. I am trying to calculate in R the volume of a donut using R console. This is given by the formula V=2*pi^2*r^2*R where r =inner radius and = to 2 and R is the outer radius and = to 6. I need to assign the variables 2 and 6 to minor_radius or r = to 2 and major-radius or R = to 6. I know with the formula it can also be written as pi*r^2 multiplied by 2*pi*R meaning pi*2^2. When these are multiplied (In R, minor_radius*major_radius) I am supposed to assign the output variable meaning the volume of the donut to vol_donut. Anyone any clues. I think this problem is really challenging. Thanks if anyone can help. Regards janice4928.