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
maks197457 [2]
3 years ago
9

Modify the program so that it can do any prescribed number of multiplication operations (at least up to 25 pairs). The program s

hould have the user first indicate how many operations will be done, then it requests each number needed for the operations. When complete, the program should then return "done running" after displaying the results of all the operations in order. It is in the Arduino Language
You can write the code from scratch if you'd like without modifying the given code. In any expected output.

//Initializing the data
float num1 = 0;
float num2 = 0;
int flag1 = 0;

// a string to hold incoming data
String inputString = " ";
// Whether the string is Complete
boolean stringComplete = false;
//This is where the void setup begins
void setup() {
//Initializing the serial
Serial.begin (9600);
//Reserving 200 bytes for the inputString
inputString.reserve (200);
Serial.println("Provide The First Number");
}

void loop() {
//Print the string when the new line arrives
if (stringComplete) {
if (flag1 == 0) {
Serial.println(inputString);
num1 = inputString.toFloat( );
flag1 = 1;
//Asking the user to input their second string
Serial.println("Provide The Second Number");
}
else if (flag1 == 1) {
Serial.println(inputString);
num2 = inputString.toFloat( );
flag1 = 2;
Serial.println("The Product is Calculating...");
}
if (flag1 == 2) {
Serial.println("The Product is: ");
Serial.println(num1*num2);
Serial.println("Press Reset");
flag1 = 5;
}
//This clears the string
inputString = " ";
stringComplete = false;
}
}

void serialEvent() {
while (Serial.available( )) {
// get the new byte
char inChar = (char)Serial.read( );
//add it to the inputString
inputString += inChar;
//if the incoming character is a newline, set a flag so the main loop can
//do something about it

if (inChar == '\n') {
stringComplete = true;
}
}
}
Computers and Technology
1 answer:
ohaa [14]3 years ago
4 0

Answer:

Im trying to prove to my parents that im smart.. so.. its 2.7! :D

Explanation:

You might be interested in
In 2 or 3 sentences, describe one advanced stradegy and how its useful
Tanzania [10]

Answer:

A search strategy is useful because it helps you learn about things that are not available to you in person. One advanced search strategy is to form words carefully. I could copy 'describe one advance search strategy and how it is useful' and put it into a search engine and get many different results that aren't helpful. But if I shorten it to 'advance search strategies' I get helpful information.

Explanation:

5 0
3 years ago
Complex communication skills will probably never be outsourced to a computer because they require the human touch.
frutty [35]
True because eventually a human needs to repair the computers
4 0
4 years ago
Limitations of systems analysis and design​
Sonja [21]

Answer:

<h3 />

Explanation:

<h3>Although System analysis offers an extensive range of benefits it might also have some disadvantages. One of the main disadvantages which is mostly overlooked is the risk of too much analysing which may be costly and time consuming. It is therefore part of the analyst's job to find the right balance.</h3>
6 0
3 years ago
What is a device that connects to the system unit and is controlled by the processor in the computer called !
Airida [17]
Most computers have three types of ports: serial, parallel, and USB. A serial port is a type of interface that connects a device to the system unit by transmitting data only one bit at a time. Serial ports usually connect devices that do not require fast data transmission rates, such as a mouse, keyboard, or modem.
4 0
3 years ago
What does coding mean​
NeTakaya
The process or activity of writing computer programs.
3 0
3 years ago
Read 2 more answers
Other questions:
  • Implement a container class Stat that stores a sequence of numbers and provides statistical information about the numbers. It su
    7·1 answer
  • __________ describes a module for which the software developer does not care how the processing is performed, but instead, knows
    7·1 answer
  • Which of the following is NOT a unit used to measure temperature?
    13·1 answer
  • Which type of operating system is usually used in personal computers
    13·1 answer
  • Within a table, the intersection of a row and a column creates a(n) ____.
    13·1 answer
  • What city, the major financial center of its country, is located on the northern coast of the island where the poet who wrote "A
    8·2 answers
  • You do not need to remove the lead weights inside tires before recycling them. A) TrueB) False
    15·1 answer
  • A Development team begins work on a new software application and decides to involve the client’s IT experts to ensure that secur
    12·1 answer
  • A company Digicom Parts manufactures 2 types of unique products for laptop and desktop computers. It manufactures 10 types of la
    15·1 answer
  • Enterprise software is designed for organizations to __________.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!