Character string comparison

This program compares character strings. You input two character strings when "Please input two strings". If you do so, It runs and return result what you input value. This program accesses character strings sequentially from first number by while loop. Loop begins if value has zero and it starts to compare input strings. When it is comparing, If two character strings value is same variable named "i" would add 1. If variable named "flag" has number, You input different character strings. Otherwise, character strings value is same.

#include <stdio.h>

int main(void){

  char a[81];
  char b[81];

  printf("同じ長さの文字列を2つ入れて\n");
  scanf("%s",a);
  scanf("%s",b);
  
  int i = 0;
  int flag = 0;

  while(a[i]!='\0'){
    if(a[i] != b[i]){
      flag+=1;
    }
    i++;
  }

  if(flag != 0){
    printf("異なる文字を入力した\n");
  }else{
    printf("同じ文字を入力した\n");
  }
 
  return 0;
}