forked from tanus786/CP-Codes-HackOctober-Fest-2023
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CelsiusToFahrenheit
58 lines (42 loc) · 1.01 KB
/
CelsiusToFahrenheit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define lt long long
#define pi (3.141592653589)
#define mod 1000000007
#define tc \
int t; \
cin >> t; \
while (t--)
#define lull NULL
#define float double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(c) c.begin(), c.end()
#define min3(a, b, c) min(c, min(a, b))
#define min4(a, b, c, d) min(d, min(c, min(a, b)))
#define fir(i, n) for (int i = n - 1; i >= 0; i--)
#define fi(i, n) for (int i = 0; i < n; i++)
#define fin(j, n) for (int i = j; i <= n; i++)
#define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
// function to convert Celsius
// scale to Fahrenheit scale
float Cel_To_Fah(float N)
{
return ((N * 9.0 / 5.0) + 32.0);
}
// Driver code
int main()
{
float N = 20.0;
// Function call
cout << Cel_To_Fah(N);
return 0;
}