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
AleksAgata [21]
2 years ago
6

Write an if-else statement for the following: If user_tickets is less than 5, assign 1 to num_tickets. Else, assign user_tickets

to num_tickets
Computers and Technology
1 answer:
Genrish500 [490]2 years ago
7 0

Solution :

function tickets(user_tickets){

var num_tickets;

if (user_tickets < 5) {

num_tickets = 1;

return ('num_tickets: '+ num_tickets);

}

else {

num_tickets = user_tickets;

 return('num_tickets: '+ num_tickets);

}

}

// Testing the tickets function

// With user_tickets = 3, 5, 8, and 1

console.log(tickets(3));

console.log(tickets(5));

console.log(tickets(8));

console.log(tickets(1));

You might be interested in
Make and run a Python program which:
PSYCHO15rus [73]

Answer:

ok

Explanation:

6 0
2 years ago
in a management information system, the quality of information is determined by its usefulness to users, and its usefulness dete
Gekata [30.6K]

Answer:

It is true, that in a management information system, the quality of information is determined by its usefulness to users, and its usefulness determines the success of the information system.

Explanation:

A management information system (MIS) is a computerized and centralized database that collects data from many different resources in the organization. And, then processes and organized the data in a way that would be useful and helpful in making a business decision. These days, for both large and small organization, collection of data and use of technology are so prevalent and these organization collecting the data from their businesses resources daily even hourly such as daily sale, daily expense, hourly wages, etc, and then managing it in a way to make a right business decision. A good MIS in an organization gives a competitive advantage because it turns the data into usable and into helpful information that can be used in making business decisions and strategy and to increase profit.

However, the information quality is based on its usefulness to the user or to the organization. Because if the MIS produces the information that is not useful to the user, the information and use of MIS are useless in the organization because the information that is required in making a business decision is not useful.

If the MIS produces the quality information to its user in making the right business decision and organization or user take the right decision that brings profit to the organization.  Then, this use of information determines the success of an information system in an organization.

For example:

In a Bakery, the MIS produce the right information in making decision e.g. MIS produce information to bakery owner that on valentine day, most people buy chocolate. Then, the owner tries to meet the demand for chocolate on valentine's day. Therefore, this is the quality of information and it is determined by its usefulness to the bakery owner and its usefulness determines the success of MIS.

4 0
3 years ago
Write a code segment that takes an emailaddress stored in the string email and stores theuser name in the string user and the ho
iragen [17]

Answer:

#include <bits/stdc++.h>

using namespace std;

int main() {

  string email,username,host;//strings to store email,username,hostname..

  cout<<"Enter the email address "<<endl;

  cin>>email;//taking input of email address..

  bool flag=1;

  for(int i=0;i<email.length();i++)//iterating over the string email..

  {

      if(email[i]=='@')//if @ symbol is encountered make flag 0 skip this iteration.

      {

          flag=0;

          continue;

      }

      if(flag==1)//add to username if flag is 1.

      {

          username+=email[i];

      }

      else//add tom host..

      host+=email[i];

  }

  cout<<"The username is "<<username<<endl<<"The host name is "<<host;//printing the username and hostname..

return 0;

}

Explanation:

I have taken  three strings to store the email address entered by user ,username and host to store username and host name respectively.Then I am iterating over the string email if @ is encountered then skip that iteration before that keep adding characters to username string and after that keep adding characters to host.

8 0
3 years ago
In short and brave what is technology?
emmainna [20.7K]

Answer:

technology is a whole means to provide goods needed for the survival and comfort of human life

8 0
3 years ago
Read 2 more answers
PLEASE HELP I WILL MARK BRAINIST!!!!!!!!!<br><br><br> What is a rolodex?
Mariana [72]
Its a gadget that helps organize cards/ a rotating file device.
5 0
3 years ago
Other questions:
  • According to Mintzberg's classification of managerial roles, the role of a(n) ______ is to transmit information received from ou
    7·1 answer
  • Put the following five steps in the order in which you would perform them to use the Paste Special function. 1. Select and copy
    6·1 answer
  • Question 4 of 20
    5·1 answer
  • 3.2 lesson practice edhesive ​
    6·1 answer
  • Which statement best compares routers and hubs?
    9·1 answer
  • What is the effect of persistence of game worlds in social video games?
    14·2 answers
  • We have constructed a Player Class for you. Add the following: public static variable: int totalPlayers Static variable should b
    8·1 answer
  • What is computer give definition ​
    14·2 answers
  • What are the 3 dimension of an information system?
    13·1 answer
  • On a Windows system, which Task Manager tab would you use to adjust the priority given to a specific program
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!