1answer.
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
Allushta [10]
3 years ago
13

Write the definition of a function isSenior, that receives an integer parameter and returns true if the parameter's value is gre

ater or equal to 65, and false otherwise. So, if the parameter's value is 7 or 64 or 12 the function returns false. But if the parameter's value is 69 or 83 or 65 the function returns true.
Computers and Technology
1 answer:
ohaa [14]3 years ago
6 0

Answer:

The function definition for this question can be given as:

Function Definition:

bool isSenior(int x )  //function

{  

//function body Or function definition.

//conditional statement

//if statement

if (x >=65)  

{

return true;   //return value true.

}

else  //else statement

{

return false;    //return value false.

}

}

Explanation:

In the above function definition firstly we define a function that isSenior. This function return Boolean value that is true or false in this function we pass the value as the parameter in that function we use the if statement that check the pass value is greater then equal to 65. If the condition is true it return true.else it will return false.

You might be interested in
Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, a
GarryVolchara [31]

Answer:

<em>C++</em>

////////////////////////////////////////////////////////////////////////////////////////////////////////

#include <iostream>

#include <vector>

using namespace std;

int main() {

  vector<int> v;

   int n = 1;

   while (n != 0) {

       cout<<"Enter an integer, the input ends if it is 0: ";

       cin>>n;

       v.push_back(n);

   }

   cout<<endl;

   ///////////////////////////////////////////////////////////

   int sum = 0;

   int num_positives = 0, num_negatives = 0;

   for (int i=0; i<v.size()-1; i++) {

       if (v[i] > 0)

           ++num_positives;

       else

           ++num_negatives;

           

       sum = sum + v[i];

   }

   //////////////////////////////////////////////////////////

   cout<<"The number of positives is "<<num_positives<<endl;

   cout<<"The number of negatives is "<<num_negatives<<endl;

   cout<<"The total is "<<sum<<endl;

   cout<<"The average is "<<(float)sum/(v.size()-1);

   ///////////////////////////////////////////////////////////

   return 0;

}

5 0
3 years ago
5(x + 4) = 4(x -6) |<br><br><br>How to do this problem
vichka [17]
5 ( x + 4 ) = 4 ( x - 6)
5x + 20 = 4x - 24
5x -4x + 20= 4x - 4x - 24
1x + 20 = -24
1x + 20 - 20 = -24 - 20
1x = -44

check

5 (-44 + 4) = 4 ( -44 - 6)
5 (-40) = 4 (-50)
-200 = -200
3 0
3 years ago
Digital subscriber lines: are very-high-speed data lines typically leased from long-distance telephone companies. are assigned t
V125BC [204]

Answer: Operate over existing telephone lines to carry voice, data, and video.

Explanation:

Digital subscriber line is a means of transferring high bandwidth data over a telephone line. Such data could be a voice call, graphics or video conferencing. DSL uses a user's existing land lines in a subscriber's home, allowing users to talk on a telephone line while also being connected to the Internet. In most cases, the DSL speed is a function of the distance between a user and a central station. The closer the station, the better its connectivity.

5 0
3 years ago
Which term refers to an interface between HTML elements and JavaScript program code that allows JavaScript code to manipulate HT
vfiekz [6]

I believe the answer is D, document object model. Conditional Statements deal with if statements, iterative structures are while and for loops, HTML tags are the tags which help to format and define a webpage, and src attribute deal with specifying external sources for certain tags.

4 0
3 years ago
____________improves the understandability of a website, by maintaining similar design elements throughout.
lora16 [44]

Simple and easy user interface design can help the users understand what they can do on the website, without confusion when they are loading on the website.

Best practice on the users experiences can help the users to visit the website easily and get what they want as fast as possible. It is the way to improve a website understandability.

4 0
3 years ago
Other questions:
  • Maggie is preparing a business report. Which types of keys will she use to type out words and numbers?
    6·2 answers
  • It is difficult to use screening questions in computer-assisted surveys. <br> a. True <br> b. False
    8·1 answer
  • Your neighbor has moved to another country. He informs you about his new job. You wantto congratulate him by sending an e-mail m
    13·1 answer
  • Why is it important to be a good digital citizen??
    11·1 answer
  • How is the JOptionPaneclass used to display a dialog box that performs a yes/noconfirmation?
    10·1 answer
  • What is the output of the following function if the array nums contains the values 1 2 3 4 5 int backwards(int nums[]) { for (x
    15·1 answer
  • What is emerging as a major business area of innovation that offers a flexible collection of computers on the internet that can
    6·1 answer
  • After fixing the format of her subheadings, she notices that she misspelled the name of one of the famous people
    7·2 answers
  • How to change color of object in photoshop?
    10·2 answers
  • PLZZZZZZZZZZ HELP ME OUT THIS DUE TODAY AND NEED SOMEONE HELP!!!!!plzzzzzzzzzzz i begging you!!!
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!