Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void) {
- const double AVAILABLE_RONS = 20;
- const double APPLES_KG_PRICE = 5;
- const double PEARS_KG_PRICE = 7;
- double x, y;
- printf("x="); scanf("%lf", &x);
- printf("y="); scanf("%lf", &y);
- if (x * APPLES_KG_PRICE + y * PEARS_KG_PRICE <= AVAILABLE_RONS) {
- puts("YES");
- } else {
- puts("NO");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement