jnbsjhsbcjdh28671 jnbsjhsbcjdh28671
  • 23-12-2020
  • Computers and Technology
contestada

Write a function that prompts the user to enter the speed of a vehicle. If speed is less than 20, display too slow; if speed is greater than 80, display too fast; otherwise, display just right

Respuesta :

PhantomWisdom PhantomWisdom
  • 24-12-2020

The code of the given problem is given below :

#include<iostream>

using namespace std;

void print( float speed ){

      if(speed < 20 )

      {

             cout<<"too slow\n";

      }

      else if(speed > 80 )

      {

             cout<<"too fast\n";

      }

      else{

             cout<<"right\n";

      }

}

int main()

{

      print( 18.6 );

      print( 45 );

      print( 100 );

      return 0;

}

Answer Link

Otras preguntas

Can you help me solve this problem?
WILL GIVE 14 POINTS AND BRAINLIEST IF ANSWERED PROPERLY WITH NO SPAM
why is the doctrine of original sin essential for the understanding of the mystery of christ​
- 7 (4 - r) = 35 what's the correct answer?
Calculate (2.5 × 106) + (7 × 105) Give your answer in standard form.
Assume you are a technical consultant who works with clients to find the best solutions for their networking and communications needs. your firm has exclusively
you are going to meet your friend jan at the cinema tomorrow write an email to jan
A farmer is planning how to use the land in a rectangular field. The rectangle shown represents the field. a rectangle with the bottom labeled 2.5 times 10 cube
Please answer asap I need in minutes and sec If you answer you get brainlest,5 star review,thanks,and a 100 points
ANSWER PLEASE AHHHHHHHH