75. Compatible Arrays

Image result for c programmingCode:
  #include<stdio.h>
int main(){
  int n,a[20],b[20],i,flag=0;
  scanf("%d",&n);
  for(i=0;i<n;i++)
    scanf("%d",&a[i]);
  for(i=0;i<n;i++){
    scanf("%d",&b[i]);
    if(a[i]<b[i])
      flag=1;
  }
  if(flag)
    printf("Incompatible");
  else
    printf("Compatible");


  return 0;
}

No comments