#include <stdio.h>
int main(void) {
int arr[8]={1,2,3,4,5,6,7,8};
int x=10;
int count=0;
for(int i=0;i<8;i++){
for(int j=0;j<8;j++){
if(i!=j && i+j==x) count++;
else continue;
}
}
printf("The no. of pairs are:%d",count
); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CglpbnQgYXJyWzhdPXsxLDIsMyw0LDUsNiw3LDh9OwogICAgaW50IHg9MTA7CiAgICBpbnQgY291bnQ9MDsKICAKICAgICBmb3IoaW50IGk9MDtpPDg7aSsrKXsKICAgICAgICAgZm9yKGludCBqPTA7ajw4O2orKyl7CiAgICAgICAgICAgIGlmKGkhPWogJiYgaStqPT14KSBjb3VudCsrOwogICAgICAgICAgICBlbHNlIGNvbnRpbnVlOwogICAgICAgIH0KICAgICAgfQogICAgICBwcmludGYoIlRoZSBuby4gb2YgcGFpcnMgYXJlOiVkIixjb3VudCk7CglyZXR1cm4gMDsKfQo=