C. Insert
Insert will let you inseet different things into your presentation.
Some programs that we have used that have condition-controlled loops and count-controlled loops due to the following reasons.
Explanation:
Condition-controlled loops
A program could be made more intelligent by programming it to avoid hazards. For example, if the robot vehicle is 3 cm from the edge of the table and you tell it to move forwards 5 cm, it will drive off the edge of the table. To stop this from happening, you might write a condition-controlled loop like this:
move forward
repeat until (touching table edge)
Condition-controlled loops can be used to add a high degree of intelligence to a computer system.
Count Controlled Loops
A count controlled loop is a repetition structure that iterates a specific number of times
You can write a count controlled loop using a
while() loop.
For example:
counter = 0
while counter < 5:
print (“This will print 5
times”)
counter += 1
Studies have shown that the people who spend more time on social media are better to show virtual empathy to their online friends
The following code will program that prompts the user to enter the num- ber of hours a car is parked at the airport and outputs the parking fee.
<u>Explanation:</u>
Code:
#include<iostream>
using namespace std;
int main()
{
float hours;
cout <<"Enter number of hours a car parked at the airport: "; // prompt the user to enter hours.
cin >> hours ; // strong the hours
if (hours > = 0 && hours < =3 ) // if 0 < = h < = 3
cout << "Parking fee: 5"; //printing parking fee is 5.
else if (hours > 3 && hours < = 9)//if 3 < h < = 9
cout<<"Parking fee: "<<6*int(hours);//converting float value to int the multiplying with 6 then printing fee.
else//if 9 < h < = 24
cout<< "Parking fee: 60";// printing parking fee 60.
return 0;
}