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
Which of these about non-disclosure agreements is accurate?
grandymaker [24]

Answer: number 2

Explanation: number 2

6 0
3 years ago
Read 2 more answers
There are two main types of hard drive available to a computer. State what they are and describe their use.
Gala2k [10]

Answer:

Hard disk drives (HDD), which use one or more rotating discs and rely on magnetic storage, and solid-state drives (SSD), which have no moving mechanical parts, but use flash memory like the kind found in USB flash drives.

Explanation:

6 0
3 years ago
Which term is used to describe a network security device or host software that filters communications, usually network traffic,
morpeh [17]

Answer:

The correct answer is option (D).

Explanation:

According to the scenario, the most appropriate answer is option (D) because the firewall can be defined as the software program which checks through the network for incoming and outgoing communication on predefined rules.

while the other options are wrong because of the following reasons :

  • A sniffer can be defined as the program which is used to check the network traffic but it didn't work on predefined rules.
  • An auditor can be defined as a program that is used to analyze the network.
  • The hacker can be a person who hacks the system to gain access or gather information.
4 0
4 years ago
What are HITs????????
nasty-shy [4]

It is namely an internet made by someone...

8 0
4 years ago
Write the pseudocode to this flowchart.
aleksandr82 [10.1K]

Answer:

I don't understand

Explanation:

4 0
3 years ago
Other questions:
  • Select three examples of cryptographs. Security tokens Shared-key Malware Firewalls Message authentication code Public-key
    7·2 answers
  • A four-year old laptop will not boot and presents error messages on screen. You have verified with the laptop technical support
    11·1 answer
  • List and the deference between MS access objects​
    8·1 answer
  • Write a program that takes the radius of a sphere (a floating-point number) as input and then outputs the sphere’s: Diameter (2
    7·1 answer
  • 16. Which of the following wire gage sizes is the thickest? A. 14 B. 8 C. 0 D. -33
    14·1 answer
  • Choose the reasons why Windows Server operating systems are a popular choice for a network because they _____. Select all that a
    12·1 answer
  • What is a good analogy for explaining the actions of a compiler?
    10·1 answer
  • Menus are attached to the windows by calling
    15·1 answer
  • A ____________ protocol is software that provides or facilitates a connection in which no information is retained by either send
    13·1 answer
  • How to create drop down list in excel with multiple selections.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!