Intro_function
main.cpp
Go to the documentation of this file.
1 // Lecture: 8.3.2018
2 #include "mylib.h"
3 #include <cassert> // assert()
4 #include <iostream>
5 using namespace std;
6 
7 
8 
9 
10 int main()
11 {
12  float varC, varF; // declaration of variables (not initialize/defined)
13  cout << "Hello world!" << endl;
14  cout << " Grad Celsius = ";
15 
16  cin >> varC; // Input from terminal
17  float varK = c2k(varC); // call function
18 
19  cout << " Kelvin : " << varK << endl;
20  cout << "####################\n";
21 
22  c2kf(varC, varK, varF); // call function
23 
24  cout << " Kelvin : " << varK << endl;
25  cout << " Fahrenheit: " << varF << endl;
26 
27  return 0;
28 }
int main()
Definition: main.cpp:10
float c2k(float const grad_C)
Definition: mylib.cpp:5
void c2kf(float const grad_C, float &grad_K, float &grad_F)
Definition: mylib.cpp:14