Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- void licz ( double a, double b, double c = 5.0 )
- {
- if (a <= b + 0.5){
- if ( fmod (a,c) == 0){
- cout << fixed << b - a - 0.50;
- }
- }
- else { cout << fixed << b;}
- }
- int main( double a = 0, double b = 0)
- {
- cout.precision(2);
- cin >> a >> b ;
- licz(a,b);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement