Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
432 B
1
Indexable
Never
//домашка
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
    int p, x, y;
    cin >> p >> x >> y;
    double r = ((double)((x + ((double)(y / 100)) + (((x + (double)(y / 100)) * p / 100)))));
    cout << (int)r;
    double n = ((r - (int)r) * 100);
    if (n - (int)n >= 0.5){
        cout << (int)n + 1;
    }
    if (n - (int)n < 0.5){
        cout << (int)n;
    }
    return 0;
}
Leave a Comment