두 개의 단어를 입력받아서 길이가 긴 단어의 문자 개수를 출력하는 프로그램을 작성하시오.
단어의 길이는 100자 이하다.
#include <stdio.h>
#include <stdlib.h>
int null(char *num)
{
    int i,j=0;
    for(i=0;i<100;i++)
    {
       if(num[i]=='\0') break;
       else j++;
    }
    return j;
}
int main(void)
{
    int i;
    char arr1[100],arr2[100];
    int max1,max2;
    printf("두 개의 단어를 입력하시오.");
    scanf("%s ",arr1);
    scanf("%s",arr2);
    max1=null(arr1);
    max2=null(arr2);
    if(max1>=max2)
    printf("%d\n",max1);
    else
    printf("%d\n",max2);
    system("pause");
    return 0;
}
