answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
My name is Ann [436]
2 years ago
6

Write multiple if statements: If carYear is before 1968, print "Probably has few safety features." (without quotes). If after 19

70, print "Probably has head rests.". If after 1991, print "Probably has electronic stability control.". If after 2002, print "Probably has airbags.". End each phrase with period and newline. Ex: carYear = 1995 prints: Probably has head rests. Probably has electronic stability control.
Computers and Technology
1 answer:
jekas [21]2 years ago
6 0

Answer:

Following is the statement in the C language :

if(carYear < 1968)

printf("\nProbably has a few safety features.\n");

if(carYear > 1970 && carYear <=1991 )

printf("\nProbably has head rests.\n");

if(carYear > 1991 && carYear <=2002)

printf("\nProbably has anti-lock brakes\n.");

if(carYear > 2002)

printf("\nProbably has airbags.\n");

Explanation:

Following is the description of the statement:

  • In the given question we used if block. The if block is only executed when their condition is true.
  • if(carYear < 1968) In this we check we the value of "carYear" variable is less then 1968 then it prints "Probably has a few safety features." in the console window.
  • if(carYear > 1970 && carYear <=1991) In this we check we the value of "carYear" variable is greater then 1970 and less then 1992 it prints "Probably has head rests" in the console window.
  • if(carYear > 1991 && carYear <=2002 ) In this we check we the value of "carYear" variable is greater then 1991 and less then 2003 it prints "Probably has anti-lock brakes" in the console window.
  • if(carYear > 2002) In this we check we the value of "carYear" variable is greater then 2002 then it prints "Probably has airbags" in the console window.

You might be interested in
What is the argument in this function =AVERAGE(F3:F26)
monitta
The argument for the function would be answer "D".
5 0
1 year ago
Write a method for the Customer class that that will return a string representing a bill notice when passed a double value repre
Nesterboy [21]

Answer:

Following are the method definition to this question:

public String notice_bill(double amount) //defining method

{

return this.name+", account number "+this.currAccNum+", please pay $"+amt;  //return value.

}

Explanation:

In the given question some information is missing, that is example So, method definition to this question can be described as follows:

  • In the above method definition a string method "notice_bill" is declared, which accepts a double value in its parameter, that is "amount".
  • Inside the method, this keyword is used, that hold values and return its value as a message.  
5 0
2 years ago
Clara writes online articles based on world religions. Her articles have references to dates. Which HTML element will help her d
brilliants [131]

Answer:

Available Options are :

A <b>

B <l>

C <body>

D <small>

Ans : A <b>

Explanation:

Normally AD and BC are written in bold letters.

for example : The terms anno Domini (AD) and before Christ (BC).

Within available option the best option to choose is <b>

The <body> element used to define the document body.

The <small> tag used to defines smaller text

But, the best option to choose is in case if they are using the HTML5  then html <time> element will be used to display BC date and AD dates.

for ex : <time datetime="-314-07-01"

calendar="Ancient Roman">1 July 314 BC</time>

3 0
1 year ago
(1) Prompt the user to enter two words and a number, storing each into separate variables. Then, output those three values on a
denpristay [2]

Answer:Prompt the user to enter two words and a number, storing each into separate variables. Then, output those three values on a single line separated by a space. (Submit for 1 point) Ex: If the input is: yellow Daisy 6 the output after the prompts is: You entered: yellow Daisy 6 Note: User input is not part of the program output. (2) Output two passwords using a combination of the user input. Format the passwords as shown below. (Submit for 2 points, so 3 points total). Ex: If the input is: yellow Daisy 6 the output after the prompts is: You entered: yellow Daisy 6 First password: yellow_Daisy Second password: 6yellow6 (3) Output the length of each password (the number of characters in the strings). (Submit for 2 points, so 5 points total). Ex: If the input is: yellow Daisy 6 the output after the prompts is: You entered: yellow Daisy 6 First password: yellow_Daisy Second password: 6yellow6 Number of characters in yellow_Daisy: 12 Number of characters in 6yellow6: 8

I have tried several different ways of doing this, but I keep getting an error on line 6

Explanation:

7 0
1 year ago
A variable like user_num can store a value like an integer. Extend the given program as indicated. Output the user's input. (2 p
lapo4ka [179]

Answer:

The answer to this question is given below in the explanation section. It is noted that this program is written in C++ using online C++ compiler.

Explanation:

#include <iostream>

using namespace std;

int squared(int num)// this is the function to compute square

   {

       return num*num;

   }

int cube(int num)// this is the function to compute cube

   {

       return num*num*num;

   }

int main()

{

   int user_num, user_num2; // variable declaration

   

       cout<<"Enter the first number: ";//prompt user to enter the number

       cin>>user_num;//store the user entered number into variable

       cout<<"\nEnter the second number: ";//prompt the user to enter the second number

       cin>>user_num2;//store the user entered number into variable

   

   

   cout<<"\nSquared of first number is: "<<squared(user_num);//compute square of user_num and display

   cout<<"\nCube of first number is: "<<cube(user_num);//compute the cube of the user_num and display

   cout<<"\nSquare of second number is: "<<squared(user_num2);//compute the square of user_num2 and display

   cout<<"\nCube of second number is: "<<cube(user_num2);//compute the cube of user_num2 and display

   

   cout<<"\nSum of number 1 and number 2 is: "<<user_num2 + user_num2;//display the sum of user_num2 and user_num

   cout<<"\nProduct of number 1 and number 2 is: "<<user_num2 * user_num;//display the product of user_num and user_num2

   

   

   return 0;//terminate the program

}

                               

7 0
2 years ago
Other questions:
  • Carlos owns a hardware store. He currently is not using any software to track what he has in the store. In one to two sentences,
    9·2 answers
  • Steps in creating a folder
    12·1 answer
  • What is the major function of the network access layer?
    5·1 answer
  • What are threats to computer system
    6·1 answer
  • When long labels are required, which of these commands can you use to improve readability of a worksheet?
    14·2 answers
  • A company operates on two types of servers: 2 large servers (L) and 4 smaller servers (S), with a combined total of 64GB RAM. Th
    9·1 answer
  • You are given an array x of string elements along with an int variable n that contains the number of elements in the array. You
    11·1 answer
  • You are consulting for a trucking company that does a large amount ofbusiness shipping packages between New York and Boston. The
    5·1 answer
  • Exercise 4: Bring in program grades.cpp and grades.txt from the Lab 10 folder. Fill in the code in bold so that the data is prop
    12·1 answer
  • Nstructions
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!