Website Summary Files Commits Branches @commit @diff @stats
path: root / Week07 / Exercise04.cpp
blob: 931931d883f9d6d8971de4ef0e4b16512b8f0a9f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iostream>

void calc(float number, double &half, int* integer) {
	half = number / 2.0;
	*integer = (int)number;
}

int main() {
	float input;
	std::cin >> input;

	double a;
	int b;
	calc(input, a, &b);

	std::cout << a << ' ' << b << std::endl;

	return 0;
}