Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You want to go for a walk at a local park. Write a piece two values from the use

ID: 3833088 • Letter: Y

Question

You want to go for a walk at a local park. Write a piece two values from the user, the length of the of code that accepts output about how interested you in path and rating for the park. You should print console or not are that route; print either very interested, sort-of interested, interested based on the following criteria: You like long walks. Any park rated at least 3.0 and having a route longer than 5 miles really interests you. You don't want a short walk. You won't take any route that is strictly less than 1 mile unless the park is rated at least 4.5. Even then you are only slightly interested. You are sort of interested in any park route that is longer than 3 miles and rated 3.5 to 4.5 You like quality parks. You are quite interested in parks that are rated 5.0. You are not interested in any other type of park.

Explanation / Answer

PROGRAM CODE:

#include <iostream>
using namespace std;

void findInterest(int len, double rating)
{
   cout<<endl;
   if(rating==5.0)
       cout<<"Very interested";
   if(rating>=3.0 && len>=5)
       cout<<"Very interested";
   else if(len>=1)
       cout<<"Sort-of interested";
   else if(len<1 && rating>=4.5 )
       cout<<"Sort-of interested";
   else if(len>=3 && rating>=3.5 && rating <=4.5)
       cout<<"sort-of interested";
   else cout<<"Not interested";
}

int main() {
   int length;
   double rating;
   cout<<"Enter length of the park: ";
   cin>>length;
   cout<<" Enter rating for the park: ";
   cin>>rating;
   findInterest(length, rating);
   return 0;
}

OUTPUT:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote