Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C by jsa ( 5 years ago )
#include<stdio.h>
int coPrime(int n1,int n2){
for(int i=2;i<=n1;i++){
if(n1%i==0&&n2%i==0) return 0;
}
return 1;
}
int main(){
int a,b,t;
scanf("%d %d",&a,&b);
for(int i=a;i<b;i++){
for(int j=i+1;j<=b;j++){
if(coPrime(a,b)) printf("(%d,%d)\n",i,j);
}
}
}
Revise this Paste