0% found this document useful (0 votes)
7 views2 pages

Name

Uploaded by

f20242661175
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Name

Uploaded by

f20242661175
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

NAME : HAFSA IQBAL

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:

You might also like