Every day few of the customers are given a lucky gift. The lucky gift is given to a customer when his / her bill number ends with the last digit of that day number or when the bill number is a multiple of the day number.
Can you help Gita in deciding whether a customer gets the lucky gift or not?
Input Format:
Input consists of 2 integers that correspond to the day number in today's date and the bill number.
Output Format:
The output is either 'yes' or 'no'. The output is yes when the customer gets the lucky gift and is no otherwise.
Sample Input 1:
5
45
Sample Output 1:
yes
Sample Input 2:
14
34
Sample Output 2:
yes
Sample Input 3:
5
44
Sample Output 3:
no
Program Code:
#include<stdio.h>
int main()
{
int day_no,bill_no;
scanf("%d%d",&day_no,&bill_no);
// printf("%d",bill_no/10);
if(((bill_no%10)==(day_no%10)) ||((bill_no%day_no==0)))
printf("yes");
else
printf("no");
return 0;
}
I need this prgm in. Java can anyone help ASAP
ReplyDelete