My issue
include <stdio.h>
int main() { int x,y,k;
if (x > y) {
if ((x - y) <= k) {
printf("yes");
}
else {
printf("no");
}
}
else {
if ((y - x) <= k) {
printf("yes");
}
else {
printf("no");
}
}
return 0;
}
My code
#include <stdio.h>
int main() { int x,y,k;
if (x > y) {
if ((x - y) <= k) {
printf("yes");
}
else {
printf("no");
}
}
else {
if ((y - x) <= k) {
printf("yes");
}
else {
printf("no");
}
}
return 0;
}
Problem Link: Approximate Answer Practice Coding Problem