Untitled
unknown
plain_text
2 years ago
432 B
7
Indexable
//домашка
#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;
}Editor is loading...
Leave a Comment