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
Bond [772]
2 years ago
8

A motor is controlled by a logic circuit. The circuit has inputs (0 or 1) from three sensors

Computers and Technology
1 answer:
vivado [14]2 years ago
6 0

Answer:

motor is controlled by a logic circuit. The circuit has inputs (0 or 1) from three sensors

R, T and W. The motor is switched off when the output from the logic circuit is 1. wym

You might be interested in
Now, extend your test program by adding a second function named split that will identify all the individual values in a comma se
otez555 [7]

Answer:

The code to copy is :

#include <iostream>

#include <string>

using namespace std;

string nextString(string str, int start_index);

int split(string str, string a[], int max_size);

int main()

{

const int VALUES = 20;

string somestring;

string varray[VALUES];

//Prompt the user to enter a comma separated string

cout << "Enter a comma seperated string: ";

//read the string

getline(cin, somestring);

//call split() method on the given string and

//store the count of individual strings in cnt

int cnt = split(somestring, varray, VALUES);

//Print the individual strings

for (int i = 0; i<cnt; i++)

cout << varray[i] << endl;

return 0;

}

//returns a sub string that starts at strat_index

//in the given string and ends before a comma

string nextString(string str, int start_index)

{

int i;

//find a comma or end of the string, after strat_index

for (i = start_index;i < str.length();i++)

{

//if comma is found, exit the loop

if (str.at(i) == ',')

break;

}

//extract the sub string

string out= str.substr(start_index, i-start_index);

return out;

}

//splits the comma separted string as individual strings

//and returns the number of individual strings

int split(string str, string a[], int max_size)

{

int i, j;

int start_index = 0;

//search for commas in the given string

for (i = 0,j=0;i < str.length();i++)

{

//if comma is identified or end of the string is identified

//, then get a strig that starts at start_index using next string

if (str.at(i) == ',' ||i==str.length()-1)

{

//save each string into an array of strings

a[j] = nextString(str, start_index);

//update the next string starting postion(starts after comma)

start_index = i + 1;

j++;

}

}

return j;

Explanation:

Please see attachments

7 0
3 years ago
What does cramming to hand in an assignment
Vikki [24]
Honestly gotta say cramming in an assignment doesnt help at all

5 0
3 years ago
What is data and instructions entered into the memory of a device
lyudmila [28]

A POINTING DEVICE IS AN INPUT DEVICE THAT ALLOWS A USER TO CONTROL A POINTER ON THE SCREEN. ... A KEYBOARD IS AN INPUT DEVICE THAT CONTAINS KEYS USER TO ENTER DATA AND INSTRUCTIONS INTO A COMPUTER.                                                                            

SORRY FOR CAPS MY CAPS KEY GOT STUCK

3 0
3 years ago
. Write a statement that throws an IllgalArgumentException with the error message Argument cannot be negative.
dybincka [34]

Answer:

public class PostAccount

{

  public void withdraw(float savings)

  {

     if (savings >=0 )

     {

        IllegalArgumentException exception

              = new IllegalArgumentException("Savings cannot be negative");

        throw exception;

     }

     balance = savings - withdraw;

  }

 }

Explanation:

IllgalArgumentException is a type of NumberFormatException  of runtime exception. Here in the program we have created an object of IllgalArgumentException class and after that we have thrown the error to show the condition if it does not satisfy the if condition.

8 0
3 years ago
9. which of the following cities is not considered one of the top game development hotbeds?
Kitty [74]

Answer:

9. C

10. C

Explanation:

I hope it can help

3 0
2 years ago
Other questions:
  • How to see if your computer has bluetooth?
    6·1 answer
  • Which button, when pressed, allows light from the subject to fall on the sensor?
    8·1 answer
  • Consider the partially-filled array named a. What does the following loop do? (cin is a Scanner object)int[] a = {1, 3, 7, 0, 0,
    10·1 answer
  • When an attacker presents a program or himself as someone else to obtain private information and pretends to be a legitimate web
    11·1 answer
  • The computer system for a major retail store was hacked. Many addresses, credit card numbers, and other pieces of customers’ per
    7·2 answers
  • Write a program that uses a dictionary to store students birthdays. Your program should ask the user what their name is, and loo
    11·1 answer
  • What are your undertale + au ships?
    15·1 answer
  • Write a program that asks the user to enter a series of single digit numbers with nothing separating them. Read the input as a C
    12·1 answer
  • Which is a software application used to analyze an organization’s data to improve decision making?
    11·1 answer
  • Explain why the receptionist responded as indicated in the following scenario.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!