Answer:
#include <iostream>
using namespace std;
int main() {
int age,time;
float price;
cout<<"Enter age:";
cin>>age;
cout<<"Enter time(in 24 hour clock for noon 1200):";
cin>>time;
if(age>13){
if(time<1700){
price=5;
}else{
price=8;
}
}else{
if(time<1700){
price=2;
}else{
price=4;
}
}
cout<<"Price: $"<<price<<endl;
}
Explanation:
Okay, here are the steps to be taken in order to be able to Write a program that determines the price of a movie ticket as given in details in the question above. Therefore, checked the steps below;
==> Input the age and the time.
==> If the age is not greater than 13, input the time(that is <1700) and follow it by imputing the price.
And if the age is greater than 13, you will also need to input the price. Just as below;
#include <iostream>
using namespace std;
int main() {
int age,time;
float price;
cout<<"Enter age:";
cin>>age;
cout<<"Enter time(in 24 hour clock for noon 1200):";
cin>>time;
if(age>13){
if(time<1700){
price=5;
}else{
price=8;
}
}else{
if(time<1700){
price=2;
}else{
price=4;
}
}
cout<<"Price: $"<<price<<endl;
}
The data link layer software would replace the MAC address of the next hop or gateway when the destination address of a network packet is to a remote network.
<h3>What is a
data link layer?</h3>
The data link layer is the second layer of the OSI model and it can be defined as an interface between the network and physical layer. Also, it comprises two (2) main sublayers and these include the following:
- Logical link control (LLC) layer.
- Media access control (MAC) layer.
In Computer networking, the data link layer software would replace the MAC address of the next hop or gateway when the destination address of a network packet is to a remote network.
Read more on data link layer here: brainly.com/question/13131540
#SPJ1
Answer:
<em>The programming language is not stated; however, I'll answer using Python programming language (</em><em>Se</em><em>e attachment</em><em> </em><em>for</em><em> </em><em>proper </em><em>for</em><em>mat</em><em>)</em>
tuition = 10000
rate = 0.04
for i in range(1,15):
tuition = tuition + tuition * rate
if i <= 10:
print("Year "+str(i)+" tuition:",end=" ")
print(round(tuition,2))
if i == 14:
print("Tuition 4th year after:",end=" ")
print(round(tuition,2))
Explanation:
<em>The first 2 lines initializes tuition and rate to 10000 and 0.04 respectively</em>
tuition = 10000
rate = 0.04
<em>The next line iterates from year 1 to year 14</em>
for i in range(1,15):
<em>This line calculates the tuition for each year</em>
tuition = tuition + tuition * rate
<em>The next 3 lines prints the tuition for year 1 to year 10</em>
if i <= 10:
print("Year "+str(i)+" tuition:",end=" ")
print(round(tuition,2))
<em>The next 3 lines prints the tuition at the 4th year after year 10 (i.e. year 14)</em>
if i == 14:
print("Tuition 4th year after:",end=" ")
print(round(tuition,2))
This question belongs to scratch programming. This programming language has various instructions to carry out various tasks. There are different types of repeat statement available. This statement or instruction allows the user / programmer to repeat certain line of statements to a number of times. Here, according to the question, we need to use “Repeat after me”
If you take a music note, the tempo, timing and pitch needs to be mentioned clearly and “:” represents that a particular note to be repeated only once.