20.(C) #Montu --->>>This one from Toph
Montu Mia is a student of “Omok School”. He likes to eat an icecream everyday. But he also likes to buy that ice-cream by his daily pocket money. His father always gives him maximum pocket money for the purpose of transportation cost only. Because his mother makes tiffin for him everyday.
So for Montu Mia, the only way to buy an ice-cream is saving money from his transportation cost as much as he can. The lowest price of an ice-cream is 10 taka.
The first line contains a single integer n (1 ≤ n ≤ 1000). This is the amount of pocket money given by Montu’s father.
The second line contains three space separated integers a, b, c (1 ≤ a, b, c ≤ n). These are the different costs (total costs) for different transports.
Output
Print “Yes :-D” if Montu can buy an ice-cream otherwise print “No :-(” without quotes.
Code is below:
#include <stdio.h>
]
int main() {
int n,a,b,c;
scanf("%d",&n);
scanf("%d%d%d",&a,&b,&c);
if(n-a>=10 || n-b>=10||n-c>=10)
{
printf("Yes :-D");
}
else{
printf("No :-(");
}
return 0;
}
Comments
Post a Comment