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
lys-0071 [83]
4 years ago
13

Write an if-else statement for the following:

Computers and Technology
1 answer:
lions [1.4K]4 years ago
8 0

Answer:

if(userTickets< 6)

awardPoints = 1;

else

awardPoints = userTickets;

Explanation:

  • The above code is in C language, In which the first statement is used to compare the userTickets value by 6 that userTickets value is less than 6 or not.
  • If the user tickets value is less than 6 then the statement of 'if' condition will be executed which assign the 1 value to the awardPoints.
  • If the user tickets value is not less than 6 then the statement of else will be executed which assign userTickets value to the awardPoint

You might be interested in
Does anyone know how to change there Name of the account that shows up? If you do please tell me in a comment and/or Answer.
Alona [7]

Answer:

change your email

Explanation:

award me brainliest

6 0
3 years ago
Read 2 more answers
Write a function named swapFrontBack that takes as input a vector of integers. The function should swap the first element in the
kondaur [170]

Answer:

#include <iostream>

#include <vector>

using namespace std;

void swapFrontBack(vector<int>& nums) {

if(nums.size() < 2) {

return;

}

swap(nums[0], nums[nums.size()-1]);

}

void printit(vector<int>& arr) {

for(int i = 0; i < arr.size(); i++) {

cout << arr[i] << " ";

}

cout << endl;

}

int main() {

vector<int> num1;

swapFrontBack(num1);

printit(num1);

num1.push_back(1);

swapFrontBack(num1);

printit(num1);

num1.push_back(2);

swapFrontBack(num1);

printit(num1);

vector<int> num2(10, 1);

num2[9] = 2;

swapFrontBack(num2);

printit(num2);

return 0;

}

Explanation:

4 0
3 years ago
How do buffers work?
sasho [114]
A buffer is able to resist pH change because the two components (conjugate acid and conjugate base) are both present in appreciable amounts at equilibrium and are able to neutralize small amounts of other acids and bases (in the form of H3O+ and OH-) when the are added to the solution.
5 0
3 years ago
Corinne is taking a chemistry class in college. A lab assignment asks students to track the melting point of ten different subst
Dmitrij [34]

Answer:

a spreadsheet

Explanation:

The data is of statistical type and is experimentally based. And hence, the spreadsheet is the best kind of software that can be used to register the record. And we can save 10 such experient results with the same format of tables on 10 different worksheets, and if we want we can adjust the readings of the 10 similar experiments at one time. And hence, we can quite effectively record as well as analyze this data on the spreadsheet. Hence, the spreadsheet is the correct option.

4 0
3 years ago
The function of a start winding in a split-phase motor is to A. provide the starting torque. B. reduce the starting current. C.
gulaghasi [49]
The most appropriate answer is A, the the start winding on a split-phase motor is to provide a starting torque. A split-phase motor is a single phase electrical motor (common in many household applications such as washing machines and household fans), with two distinct windings on the stator coils, the start windings and the run windings, at 90 degrees apart. When the motor is energised the start coils acts like a second phase (2 phase motor) and helps provide the rotating magnetic field that is necessary to turn the rotor. Once moving, only the run winding (single phase) is required to keep the motor spinning.

The other answers are irrelevant for the starting of the motor.
4 0
3 years ago
Other questions:
  • While shopping online for gardening supplies, Lana visits a website she had heard advertised on Home and Garden Television (HGTV
    5·1 answer
  • Which data type structures best for insersion/ removal - Stack, linked list, queue?
    15·1 answer
  • If you need to determine impacts on revenue resulting from an increase or
    15·1 answer
  • What information and options can be found on the File tab?
    8·1 answer
  • hen a computer user stored data in computer memory, it required 1,024 bytes. How many KB does this represent?
    8·1 answer
  • g Write a recursive function all capital (L,start ,stop) that takes a string L and two integers. It returns a Boolean (True/Fals
    8·1 answer
  • Write the code for the following problem.
    9·1 answer
  • In what ways can you sort data by using the sort procedure? Check all that apply.
    6·1 answer
  • Any computer expert to help me answer this question.. am giving brainliest
    13·1 answer
  • We initialize the parameters to all zero values and run the linear perceptron algorithm through these points in a particular ord
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!