Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
320 B
1
Indexable
Never
#include <iostream>
#include <math.h>
using namespace std;
int main ()
{
    int a;
    string d3;
    float b, d, d2 = 0, c, c2 = 0;
    cin >> a;
    for (int i = 0; i < a; i++)
    {
        cin >> b;
        c = float (int (b));
        d = (b - int (b));
        c2 += c;
        d2 += d;
    }
    cout << c2-d2;
}