题解 | #小乐乐查找数字#
小乐乐查找数字
https://www.nowcoder.com/practice/4c49a3a1559141f7a080a48c98cca4cb
#include<stdio.h> int main() { int n,i,m,t; t=0; int a[100] = { 0 }; scanf("%d", &n); for (i = 0;i <= n-1;i++) { scanf("%d", &a[i]); } scanf("%d", &m); for (i = 0;i < n;i++) { if (a[i] == m) t++; } printf("%d", t); return 0; }