We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
int main() {
// Return "YES" if all four conditions can be satisfied, and "NO" otherwise
int c1;
int c2;
int h1;
int h2;
scanf("%d %d %d %d", &c1, &c2, &h1, &h2);
if((c1>=35&&c1<=95) && (c2>=30&&c1<=95) && (h1>=63&&h1<=95) && (h2>=59 && h2<=95))
{
printf("YES");
}
else{
printf("NO");
}
return 0;
}
for one test case the input given is 35,35,35,35 and for other input 95,95,95,95 so how the ouput is yes for both the case...How?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Hot and Cold
You are viewing a single comment's thread. Return to all comments →
include
include
include
include
include
include
include
int main() { // Return "YES" if all four conditions can be satisfied, and "NO" otherwise int c1; int c2; int h1; int h2; scanf("%d %d %d %d", &c1, &c2, &h1, &h2); if((c1>=35&&c1<=95) && (c2>=30&&c1<=95) && (h1>=63&&h1<=95) && (h2>=59 && h2<=95)) { printf("YES"); } else{ printf("NO"); } return 0; } for one test case the input given is 35,35,35,35 and for other input 95,95,95,95 so how the ouput is yes for both the case...How?