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
SCORPION-xisa [38]
4 years ago
10

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:
Anestetic [448]4 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
When a CPU executes each instruction in a program, it uses a process known as the __________.
lapo4ka [179]

Answer:

The answer is "fetch-decode-execute cycle"

Explanation:

The FDE cycle stands for Fetch-Decode-Execute cycle, It is a computing operation, in which a CPU process, to retrieves the system in its order memory form, it also decides that what instruction is supposed to do, and executes certain activities.  In this process, the operating system loads the files and the program on a disc to the main memory (RAM).

8 0
4 years ago
11. FROM WHICH MENU WOULD YOU BE ABLE TO FIND COLUMNS? *
aksik [14]
The answer is insert
8 0
3 years ago
Write a one-line program to output the following haiku.
Serggg [28]

10 CLEAR: PRINT "A lightning flash: between the forest trees I have seen water.": END

8 0
3 years ago
Read 2 more answers
I'm pretty sure most of you know squid game, right? Well, are the actors really dying? or is it just CGI or effects? Because it'
valentinak56 [21]

Answer:

不,他们在制作系列时使用了特殊效果。

可以看幕后!!

6 0
3 years ago
Read 2 more answers
What subsection of the Internet requires specialized browser to access and is frequently used by cyber criminals and underground
kotykmax [81]

Answer:

c. Dark Web                                                

Explanation:

Surface web is also called visible web is a part of world wide web that can be easily searchable using search engines as its contents are indexed by the search engines such as Google and its contents are accessible by public using standard web browsers. So a is not a suitable choice.

Deep Web is called invisible web as it is not accessible or searchable to standard search engines like Google. Search engines cannot index the contents of these sites. However such sites do not requires specialized browsers to access. So b is not a suitable choice.

Dark Web: It is a part of Deep Web sites but it requires specialized software and browsers to access. These sites cannot be indexed and cannot be searchable through standard search engines. This is also called dark side of the world wide web darker which is frequently used by criminals, hackers, black markets, hit-men. Illegal activities on a massive level is takes place in the dark web such as access to stolen sensitive information, malware, drug trade and terrorist operations. These sites are temporary and keep changing addresses to lessen the risk of getting caught by govt agencies or security officials. So c is the suitable choice.

Crypto-Net is a kind of neural network which works with encrypted data which can make a prediction based on the data without disclosing the data and prediction to the 3rd party. So d is not a suitable option.

6 0
3 years ago
Other questions:
  • Create a hypothetical business withapproximately 50 to 100 employees. Place theemployees in two or three different departments.A
    14·1 answer
  • ​open-source software is​ ________.
    11·1 answer
  • What is your favorite food
    11·2 answers
  • Identify a true statement about a flat file system. a. Data in a flat file system can be updated efficiently. b. Data in a flat
    9·1 answer
  • What size segment will be allocated for a 39 KB request on a system using the Buddy system for kernel memory allocation?A) 42 KB
    11·1 answer
  • If Jake wants to find out if the size of a fruit has any effect on the total sales for the week of that particular fruit, what c
    15·1 answer
  • Question # 2
    6·1 answer
  • Who is considered as the father of computer science?​
    11·1 answer
  • Which three characteristics help identify a business opportunity? (Choose three)
    14·1 answer
  • quizlet ann is a security professional for a midsize business and typically handles log analysis and security monitoring tasks f
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!