"Main" goes in the blank. For example in C++ all of your code goes in the main function.
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 most widely used forming machine arrangement is the individual section machine (or IS machine). This machine has a bank of 5–20 identical sections, each of which contains one complete set of mechanisms to make containers. ... Sections make either one, two, three or four containers simultaneously.
Answer:
Explanation:
Denote the five numbers as a, b, c, d and e.
The average is:
(a + b + c + d +e) ÷ 5.
Easily:
Learn how to do input and output operations in your programming language of choice.
Learn what average is (see Arithmetic mean - Wikipedia)
Learn how to code arithmetic operations in your PL of choice.
Put all that together and code the program.
Oh, did you expect the code snippet? Sorry, I don’t do peoples’ homework for them on principle. Homework is for you to learn something. If you can’t be bothered, accept that you’ll fail your class. If you want to pass, LEARN.