返回主页
学习人数: 27.7k
stroke-dashoffset="*2.6389" stroke-linecap="round" transform="rotate(-90 50 50)"/>
正确率: 100%
未通过

程序读入20个整数,统计非负数个数,并计算非负数之和。

 #include <stdio.h>

   main( )

   {  int  i, a[20], s, count;

     s=count=0;

     for(i=0;   ; i++)

        scanf(“%d”, &a[i] );

     for(i=0; i<20; i++)

     {  if( a[i]<0 )    continue  ;

             ;

        count++;

     }

     printf(“s=%d\t  count=%d\n”, s, count”);

    }

 

回答区域
提示
提示内容

登录后提交答案


由于参与答题的同学过多,仅展示其中100个同学的回答 (点击展开回答)