-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathloops.cpp
More file actions
50 lines (38 loc) · 870 Bytes
/
Copy pathloops.cpp
File metadata and controls
50 lines (38 loc) · 870 Bytes
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
#include <iostream>
using namespace std;
int main(){
// int n;
// cout<<"Enter the number n: "<<endl;
// cin>>n;
//To print numbers from 1 to N
// int i=1;
// while (i<=n)
// {
// cout<<i<<" ";
// i= i+1;
// }
//To print sum of N numbers
// int i=1 , sum =0;
// while (i<=n)
// {
// // cout<<sum<<" ";
// sum = sum+i;
// i= i+1;
// }
// cout<<"The value of Sum is: "<<sum;
//To print sum of even numbers
// int i=2 , sum =0;
// while (i<=n)
// {
// // cout<<sum<<" ";
// sum = sum+i;
// i= i+2;
// }
// cout<<"The value of Sum is: "<<sum;
//Fahrenhiet to Celcius
double f , c;
cout<<"Enter the temperature in Fahrenhiet: ";
cin>>f;
c=((f-32)*5)/9;
cout<<"The temp in Celcius is: "<<c<<endl;
}