6) Write a script that will prompt the user for a temperature in degrees Celsius, and then an F for Fahrenheit or K for Kelvin. The script will print the corresponding temperature in the scale specified by the user. For example, the output might look like this: Enter the temp in degrees C: 29.3 Do you want F or K? F The temp in degrees F is 84.7 The format of the output should be exactly as specified here. The conversions are: F= 9/5C+32 K=C+273.15

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter4: Making Decisions
Section: Chapter Questions
Problem 2E: Write a program named Twitter that accepts a users message and determines whether it is short enough...
icon
Related questions
Question
6) Write a script that will prompt the user for a temperature in degrees
Celsius, and then an F for Fahrenheit or K for Kelvin. The script will print
the corresponding temperature in the scale specified by the user. For
example, the output might look like this:
Enter the temp in degrees C: 29.3
Do you want F or K? F
The temp in degrees F is 84.7
The format of the output should be exactly as specified here. The
conversions are:
F= 9/5C+32
K = C+273.15
7) Given x = 1:10 and y = [3 1 5 6 8 29 47 0], find the results of the
Following commands:
a) (x > 3) & (x < 8)
b) x(x > 5)
с) у(х <- 4)
d) x( (x< 2) | (x >= 8) )
e) y( (x < 2) | (x >= 8) )
f) x(y < 0)
8) Given that x = [1 52 89 0 1] and y =[5 2 2 6 0 0 2], find the
results of the following commands:
a) x >y
b) у <x
c) x=y
d) x <-у
e) y >= x
f) x | y
g) x & y
h) x & (~y)
i) (x > y) | (y< x)
) (х > у) & (у<х)
PAGE 10 OF 19
Transcribed Image Text:6) Write a script that will prompt the user for a temperature in degrees Celsius, and then an F for Fahrenheit or K for Kelvin. The script will print the corresponding temperature in the scale specified by the user. For example, the output might look like this: Enter the temp in degrees C: 29.3 Do you want F or K? F The temp in degrees F is 84.7 The format of the output should be exactly as specified here. The conversions are: F= 9/5C+32 K = C+273.15 7) Given x = 1:10 and y = [3 1 5 6 8 29 47 0], find the results of the Following commands: a) (x > 3) & (x < 8) b) x(x > 5) с) у(х <- 4) d) x( (x< 2) | (x >= 8) ) e) y( (x < 2) | (x >= 8) ) f) x(y < 0) 8) Given that x = [1 52 89 0 1] and y =[5 2 2 6 0 0 2], find the results of the following commands: a) x >y b) у <x c) x=y d) x <-у e) y >= x f) x | y g) x & y h) x & (~y) i) (x > y) | (y< x) ) (х > у) & (у<х) PAGE 10 OF 19
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Unary Predicate
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,