i did it because array starts at 0. so 0,1,2,3,4,5,6,7,8,9 = 10
and b < 10 = 10 also
this is the problem
Write a program that asks the user to type 10 integers of an array. The program must compute and write how many integers are greater than or equal to 10.
#include <iostream>
usingnamespace std;
int main ()
{
int N = 10;
int t[N], i=0, V;
for (i = 0; i < N; i++)
{
cout << "Type an integer: ";
cin >> t[i];
}
cout << "Type the value of V: ";
cin >> V;
for (i = 0; i < N; i++)
{
if (t[i] == V)
{
cout << "V is in the array" << endl;
return 0;
}
}
cout << "V is not in the array" << endl;
}