码迷,mamicode.com
首页 > 其他好文 > 详细

湘潭大学oj循环1-5

时间:2019-09-15 11:12:43      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:++   goto   ret   clu   std   got   turn   can   lib   

#include <stdio.h>
#include <stdlib.h>

int main()
{   int b,s,n;
    int a[101];


    A:scanf("%d",&n);
    s=0;
    if(n!=0)
    {
        for(b=1;b<=n;b++)
    {   scanf("%d",&a[b]);

       if(a[b]%2==0)
       s=s+a[b];

    }
       printf("%d\n",s);
       goto A;
    }




     return 0;
}

湘潭大学oj循环1-5

标签:++   goto   ret   clu   std   got   turn   can   lib   

原文地址:https://www.cnblogs.com/kyx599/p/11521258.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!