#include <iostream>
usingnamespace std;
int main()
{
int list[10]= {1,2,9,10,3,8,12,6,4,7}, n, countn=0, i=0;
cout<<"Enter a number: ";
cin>>n;
for (i=0; i<10; i++)
{
cout<<list[i]<<endl;
if (list[i]>n)
{
countn++;
}
}
cout<<countn<<" numbers are more than "<<n<<endl;
return 0;
}
#include <iostream>
usingnamespace std;
int main()
{
int list[10]= {1,2,9,10,3,8,12,6,4,7}, n, countn=0, i=0;
for (i=0; i<10; i++)
{
cout<<list[i]<<endl;
}
cout<<"Enter a number: ";
cin>>n;
for (i=0; i<10; i++)
{
if (list[i]>n)
{
countn++;
}
}
cout<<countn<<" numbers are more than "<<n<<endl;
return 0;
}