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
Choose the correct climate association for: deciduous forest
kow [346]

Answer:

Mid Latitude Climate!

Explanation:

I've studied this! Hope this helps! :)

3 0
3 years ago
An employee who interacts with customers regarding the nature of their car problems, rather than actually working on the vehicle
denis-greek [22]
The answer to your question would be service writer. The service writer's job, is to log all information and such, and generally decide what happens.
4 0
3 years ago
Which of the following is another type of brake system used in trucks
Doss [256]

answer is d hope it helps

4 0
3 years ago
A nursing informatics specialist is preparing an in-service program for staff on healthcare informatics and information technolo
Snezhnost [94]

Answer:

A- information

Explanation:

According to my research on nursing informatics specialists, I can say that based on the information provided within the question the nurse would emphasize information as the primary focus. This is because knowing what healthcare informatics entails as well as having the knowledge of how to use the technology is the most important aspect of the job.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

5 0
3 years ago
4. WiFi and WiMax are used for a high-speed wireless access technology.
nikdorinn [45]

Answer: Wifi and WiMax are used to create wireless network connections.

Explanation: Wifi and WiMax are used to create wireless network connections. Wifi is used to create small networks and used to connect printers, computers, gaming consoles. WiMax uses spectrum to deliver connection to network. WiMax is used to provide internet services such as Mobile Data and hotspots.

8 0
3 years ago
Other questions:
  • The following code in a different program is not working properly. The message should display the value of the intCounter variab
    14·1 answer
  • Given that the array monthSales of integers has already been declared and that its elements contain sales data for the 12 months
    6·1 answer
  • Which word most likely means "a timepiece fitted with a recording device that marks down exact intervals of time"? chronograph c
    9·2 answers
  • A user prefers an external monitor, mouse, and keyboard for a laptop. The user does not want to use the built-in screen; however
    5·1 answer
  • If you need to set up direct deposit, which information from your check would you likely need?
    7·2 answers
  • Sierra needs to ensure that when users are entering data into a datasheet or form that they are limited in the values they can s
    15·2 answers
  • Enter the word that belongs in the blank:
    13·1 answer
  • What is the difference between cyberbullying and bullying.
    5·2 answers
  • What is wrong here??
    14·1 answer
  • Select the correct answer.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!