zoukankan      html  css  js  c++  java
  • 1113

    #include <stdio.h>
    #include <string.h>
    int main()
    {
    char a[1000],b[1000];
    int an,bn,a1,b1,i;
    while(scanf("%s%s",&a,&b )!=EOF)
    {
    a1=0;
    b1=0;
    an = strlen(a);
    for(i=0; i<an; i++)
    {
    if(a[i]>='0'&&a[i]<='9')
    {
    a1 = a1*10+a[i]-'0';
    }
    }
    if(a[0]=='-')
    {
    a1 = -a1;
    }
    bn = strlen(b);
    for(i=0; i<bn; i++)
    {
    if(b[i]>='0'&&b[i]<='9')
    {
    b1 = b1*10+b[i]-'0';
    }
    }
    if(b[0]=='-')
    {
    b1 = -b1;
    }
    printf("%d ",a1+b1);

    }
    return 0;
    }

  • 相关阅读:
    37.js----浅谈js原型的理解
    iOS
    iOS
    iOS
    python3
    ios
    iOS
    python3
    python3
    iOS
  • 原文地址:https://www.cnblogs.com/guanwen769aaaa/p/9861247.html
Copyright © 2011-2022 走看看