Name
Name
ID:F20242661175
Task no:1
Write a program converts a temperature from Celsius to Fahrenheit. Use the
following formula: F = 1.8 x C + 32
Code:
#include<iostream>using namespace std;int main()
{
float celsius, fahrenheit;
cout<<"Enter the Temperature in Celsius: ";
cin>>celsius;
fahrenheit = (celsius*1.8)+32;
cout<<"\nEquivalent Temperature in Fahrenheit: "<<fahrenheit;
cout<<endl;
return 0;
}
Output:
Task no:2
Write a program that reads three integers representing hours, minutes,
and seconds of a time. Then it should calculate the equivalent time in
seconds.
Code: