#4718. 数组入门综合练习-2
数组入门综合练习-2
统计数组大于50的数字个数(for+if并列)
题目描述
定义长度为5的int型数组,循环输入5个数字存入数组。遍历数组,判断并统计大于50的数字个数,最后输出总个数。
输入样例
22 66 51 19 88
输出样例
3
参考代码
#include <iostream>
using namespace std;
int main()
{
return 0;
}
定义长度为5的int型数组,循环输入5个数字存入数组。遍历数组,判断并统计大于50的数字个数,最后输出总个数。
22 66 51 19 88
3
#include <iostream>
using namespace std;
int main()
{
return 0;
}