Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 4 : The following sketch solves the following equation and prints the result on the serial monitor. k = x 2 + x y

Part 4:
The following sketch solves the following equation and prints the result on the serial monitor.
k=x2+xy-11100
x=8,y=2
int x=8,y=2, temp;
double k=0.0;
void setup()(
I/ put your setup code here, to run once:
Serial begin (9600);
k=x**x+x**y-11100; // line 6
Serial.print("k=");
Serial.println(k);
k=x**x+x**y-11100.0; // line 10
Serial.print("k=");
Serial.println(k);
temp=k; // line 14 Coms (Arduino/Genuino Uno)
temp =k; // line 14
Serial.print("temp=");
Serial.println(temp);
}
void loop()1
Send
// put your main code here, to run repeatedly:
}
Explain why the result in Line 6 is different than the result in Line 10. Also, why is the variable "temp" (Line 14) equal to zero even though k is not?
Write a program that converts a temperature value in Fahrenheit degrees to Celsius degrees and prints it on the serial monitor. (Use the formula C=(59)(F-32) for conversion. The temperature in Fahrenheit is defined and initialized as a global variable). Your Serial monitor should be look like Figura_8
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

database lab with c

Answered: 1 week ago