请问各位我哪里出问题了,我比较菜

字符串比较
(时间限制:3000MS 内存限制:32768KB)
描述
按字母顺序比较两个字符串ch1和ch2的大小,若相等,则输出0;否则输出其第一个不相等的字符的acsii编码差值。
输入
输入只有一组,首先在第一行上输入字符串ch1,然后在第二行输入字符串ch2,保证每个字符串长度不超过80。
输出
在一行上输出比较结果。若相等,则输出0;否则输出其第一个不相等的字符的acsii编码绝对差值。
难度
一般
输入示例
abcdefg
abcdefh
输出示例
1


#include 
#include 
#include 
#include 
using namespace std;

int main()
{char ch1[80];int i;
 char ch2[80];
 cin>>ch1;
 cout<>ch2;
 if (strcmp(ch1,ch2)==0)
    cout<<0;
 else
 for(i=0;i<80;i++)
 {if (strcmp(ch1[i],ch2[i])!=0)
 cout<<fabs(int ch1[i]-int ch2[i]);break;
 }






    return 0;
}
#include <iostream>
#include <cstring>
#include <math.h>
#include <string.h>

using namespace std;

int main()
{
    char ch1[80],ch2[80];
    int i;
    cin>>ch1;
    cin>>ch2;
    if (strcmp(ch1,ch2)==0)
    {
        cout<<0;
    }
    else
    {
        if ((i = strcmp(ch1,ch2))!=0)
        {
            cout<<abs(i);
        }
    }
    return 0;
}