#include <ctime>
#include <cstdlib>
#include <iomanip>
#include <iostream>
using namespace std;
int nonInteger(double *a, int size, double *b){
	int r = 0;
	for (int i = size; i--; r += a[i] == (int)a[i]);
	if (b){
		r = 0;
		for (int i = size; i--;)
			if (a[i] == (int)a[i])
				b[r++] = a[i];
	}
	return r;
}
int main(){
	srand(time(NULL));
	size_t n = rand() % 20 + 1;
	double *a = new double[n];
	for (int i = 0; i < n; cout << fixed << setw(5) << setprecision(1) << (a[i] = rand() % 100 + rand() % 2 * 0.5), ++i);
	cout << endl;
	size_t k = nonInteger(a, n, NULL);
	double *b = new double[k];
	k = nonInteger(a, n, b);
	for (int i = 0; i < k; cout << fixed << setw(5) << setprecision(1) << b[i], ++i);
	delete a, b;
	return 0;
}