Answer:
(1) #include<iostream>
(2) #include<conio.h>
(3) using namespace std;
(4) void main()
(5) {
(6) float temp;
(7) char sel;
(8) cout<<“Select a temperature value in Celcius or Fahrenheit.\n”;
(9) cout<<“Press C for Celcius.\n”;
(10) cout<<“Press F for Fahrenheit.\n”;
(11) cin>>sel;
(12) switch (sel)
(13){
(14)case ‘C’:
(15) cout<<“Enter a temperature value in Celcius: “;
(16)cin>>temp;
(17) if(temp<=0)
(18) {
(19) cout<<“Water is solid at “<<temp<<” degree C.”;
(20) }
(21) else if(temp>=100)
(22) {
(23) cout<<“Water is gaseous at “<<temp<<” degree C.”;
(24) }
(25) else
(26) {
(27) cout<<“Water is liquid at “<<temp<<” degree C.”;
(28) }
(29) break;
(30) case ‘F’:
(31) cout<<“Enter a temperature value in Fahrenheit: “;
(32) cin>>temp;
(33) if(temp<=32)
(34) {
(35) cout<<“Water is solid at “<<temp<<” degree F.”;
(36) }
(37) else if(temp>=212)
(38) {
(39) cout<<“Water is gaseous at “<<temp<<“degree F.”;
(40) }
(41) else
(42) {
(43) cout<<“Water is liquid at “<<temp<<” F.”;
(44) }
(45) break;
(46) }
(47) getch();
(48) }
Answer:
cyptographically
Explanation:
Did this question and got it right. Good luck!
Answer:
def newton(n):
#Define the variables.
t = 0.000001
esti = 1.0
#Calculate the square root
#using newton method.
while True:
esti = (esti + n / esti) / 2
dif = abs(n - esti ** 2)
if dif <= t:
break
#Return the result.
return esti
#Define the main function.
def main():
#Continue until user press enters.
while True:
try:
#Prompt the user for input.
n = int(input("Enter a number (Press Enter to stop):"))
#display the results.
print("newton = %0.15f" % newton(n))
except:
return
#Call the main function.
main()
Answer:
Just go to view profile, and there should be an upload button where a picture would go
Explanation: