题解 | #小乐乐查找数字#

小乐乐查找数字

http://www.nowcoder.com/practice/4c49a3a1559141f7a080a48c98cca4cb

#include<stdio.h>
int main(){
    int n,a[100],x,i,showtime=0;
    scanf("%d",&n);
    for(i =0;i<n;i++)
        scanf("%d",&a[i]);
    scanf("%d",&x);
    while(n>=0){
        if(x==a[n--]) showtime++;
    }printf("%d\n",showtime);
}
全部评论

相关推荐

待现的未见之事:起码第一句要把自己的优势说出来吧。比如什么xx本27届学生,随时到岗....
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务