Task 1 .
import java.util.*; class FahrenheitToCelsius { public static void main(String[] args) { float temperatue; Scanner in = new Scanner(System.in); System.out.println("Enter temperatue in Fahrenheit"); temperatue = in.nextInt(); temperatue = ((temperatue - 32)*5)/9; System.out.println("Temperatue in Celsius = " + temperatue); } }
Task 2
a)
class Area{
double r;
double v;
double a;
double temp;
public void calcA(){
temp = ((3.14*3.14*r*r)+(9*v*v));
a = math.sqrt(temp)/(r*r);
}
}
class sample {
public staic void main(String[] args){
Area ob = new Area();
ob.r = 5;
ob.v = 10;
ob.caclArea();
}
}
Task 2
B)
class Area{ static double v=10; double a; double temp; public double calcA(double r){ temp = ((3.14*3.14*r*r)+(9*v*v)); a = math.sqrt(temp)/(r*r); return a; } } class sample { public staic void main(String[] args){ Area ob = new Area(); double area = ob.caclArea(5); System.out.println("Area is"+ area); } }
Task 1: Write a function that accepts temperature in degrees Fahrenheit and computes the corresponding value...
8.) Write a C++ program to convert temperature in degrees Fahrenheit to degrees Celsius. This is the equation for this conversion: Celsius = 5.0/9.0 (Fahrenheit-32.0) Have your program convert and display the Celsius temperature corresponding to 98.6 degrees Fahrenheit. Your program should produce the following display (replacing the underlines with the correct values): For a Fahrenheit temperature of-_ degrees, the equivalent Celsius temperature is degrees
If the Celsius temperature is 20 degrees the corresponding Fahrenheit temperature is 68 degrees. When the Celsius temperature is 80, the corresponding Fahrenheit temperature is 176 degrees. Let C represent the Celsius temperature and F the Fehrenheit temperature. a) Express F as an exact linear function of C. b) Solve the equation in part a for C, thus expressing C as a function of F. c) For what temperature does F=C?
Write a program named FahrenheitToCelsius that accepts a temperature in Fahrenheit from a user and converts it to Celsius by subtracting 32 from the Fahrenheit value and multiplying the result by 5/9. Display both values to one decimal place. For example, if 88.5 degrees is input, the output would be: 88.5 F is 31.4 C Answer in C# (Posting incomplete code i have so far that wont run correctly.) using System; using static System.Console; class FahrenheitToCelsius { static void Main()...
Write a function that takes temperature in degrees Fahrenheit as input and returns the temperature in degree Celsius as output. Here is the signature of the function: double toCelsius (double) Following is the formula to convert °F to °C:
1. We have sever ral Fahrenheit degrees in a fi e 'Fdeg.dat and want to to read all of them into a list and convert the numbers to Celsius degrees. Thereafter, we want to write out a file named degrees.dat with two columns, the left with the Fahrenheit degrees and the right with the Celsius degrees. Fahrenheit degree can be converted to Celsius by: C (5.0/9) * (F-32) An example on the input file format looks like: Temperature data Fahrenheit...
This program will take the user's input as a temperature in degrees
Fahrenheit. The user will then click a radio button indicating
whether a table of temperatures, starting with the entered value,
will be displayed in increments of 5 degrees F or 10 degrees F.
When a submit button is clicked your code will display a HTML table
of temperature values. The first column will be temperatures in
degrees Fahrenheit, given in increments of 5 or 10 degrees F,
depending...
Write a Python program that can convert a Fahrenheit temperature to Celsius, or vice versa. The program should use two custom functions, f_to_c and c_to_f, to perform the conversions. Both of these functions should be defined in a custom module named temps. Custom function c_to_f should be a void function defined to take a Celsius temperature as a parameter. It should calculate and print the equivalent Fahrenheit temperature accurate to three decimal places. Custom function f_to_c should be a value-returning...
FOR PYTHON Write a Python program that can convert a Fahrenheit temperature to Celsius, or vice versa. The program should use two custom functions, f_to_c and c_to_f, to perform the conversions. Both of these functions should be defined in a custom module named temps. Custom functionc_to_f should be a void function defined to take a Celsius temperature as a parameter. It should calculate and print the equivalent Fahrenheit temperature accurate to three decimal places. Custom function f_to_c should be a...
B. Suppose a thermometer reads TC a. Write an expression for how many Fahrenheit degrees there are between 0 and TC. Your expression would give the Fahrenheit temperature if both temperatures had their o" mark at the same place. However, when the Celsius scale reads o', the Fahrenheit scale reads 32°. Write an equation relating the Fahrenheit temperature to the Celsius temperature. Define your variables clearly. b.
B. Suppose a thermometer reads TC a. Write an expression for how many...
R-Studio (R Programming Language) 9. The conversion from a temperature measurement in degrees Fahrenheit F to Celsius C is performed using the following equation `C = 5/ 9 (F - 32)` Use vector-oriented behavior in R to convert the temperatures `45, 77, 20, 19, 101, 120, and 212` in degrees Fahrenheit x_fahren` to degrees Celsius `x_cel`. ```{r} #insert your code ``` 10. Use the function `paste` to create the following character vectors of length 25: `("label 1", "label 2", .....,...