The program must accept an integer M and a digit N as the input. The program must print the concatenated value of M and N as the output if the unit digit of M is not equal to N. Else the program must print M without it’s unit digit as the output.
Example Input/Output 1:
Input:
981 2
Output:
9812
solution:
int main()
{
int a,b;
scanf("%d %d",&a,&b);
if(abs(a)%10!=abs(b)%10){
printf("%d%d",a,b);
}
else{
printf("%d",a/10);
}
}
Thanks for this bro
ReplyDeletethank you so much...bro🙏
ReplyDeleteThank you so much it really worked..!!
ReplyDelete