The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
I am new to C++ programming, I am trying to pass my code through the computer software my college uses. It is called mindtap through cengage. It keeps saying only 25% is passing because I failed to plant parameters,the chaper is over input and output and setting parameters. My code works , but when I run it through my colleges c++ software it grades me at a 50 due to failing to plant parameters. Below is my Question and code.     Please help me set parameters.,                                                                                                                                                                                                                                                                                                                    Paula and Danny want to plant evergreen trees along the back side of their yard. They do not want to have an excessive number of trees. Write a program that prompts the user to input the following: The length of the yard. The radius of a fully grown tree. The required space between fully grown trees. The program outputs the number of trees that can be planted in the yard and the total space that will be occupied by the fully grown trees.                                                                                                                                     Â
#include
using namespace std;
int main()
{
  int length,space,totalSpace,radius,trees;
 Â
  cout<<"Enter the length of yard";
  cin>>length;
  cout<<"nEnter the radius of fuly grown tree";
  cin>>radius;
  cout<<"nEnter the required space between fully grown trees";
  cin>>space;
 Â
  trees = (length*length)/(3.14*radius*radius+space); //square yard divided by circle of tree
  cout<<"nNumber of trees that can be planted in the yard : "<  Â
  totalSpace = trees*space;
  cout<<"nTotal space that will be occupied by fully grown trees : "<  Â
  return 0;
}