Computer Science, asked by YOURDADPRODUCTION, 1 day ago

To take temperature in Celsius as float type from user and convert into Fahrenheit.
[ SUBJECT ARTIFICIAL INTELLIGENCE, PYTHON, CLASS 9th ]

DON'T SPAM IF YOU DON'T KNOW!​

Answers

Answered by alkeshkumar408
0

Answer:

temp = float(input("Enter Temperature: "))

unit = input("Enter unit('C' for Celsius or 'F' for Fahrenheit): ")

ans .

this is coding,

if unit == 'C' or unit == 'c' :

newTemp = 9 / 5 * temp + 32

print("Temperature in Fahrenheit =", newTemp)

elif unit == 'F' or unit == 'f' :

newTemp = 5 / 9 * (temp - 32)

print("Temperature in Celsius =", newTemp)

else :

print("Unknown unit", unit).

plls give me thanks

Answered by aidenfernandes0407
0

Answer:

  1. #include<stdio.h>
  2. int main()
  3. {
  4. float fahrenheit, celsius;
  5. celsius = 24;
  6. fahrenheit =( (celsius*9)/5)+32;
  7. printf("\n\n Temperature in fahrenheit is: %f",fahrenheit);
  8. return (0)

Mark as Brainliest!

Similar questions