my program should display each day of the week the number of students attended to the class and show me the total which day 30 students were present in the class specific the day by using searching
i don't know if my program is true or not
can you give me some hints ..
.....
#include<iostream>
using namespace std;
int main()
{
int c=0,pos=-1,i,n=5,x;
int day[15];
bool found=false;
cout<<"please enter attendsin of student in array ";
for(i=0;i<n;i++)
cin>>day[i];
cout<<"please searching of day on which 30 students werw present in the class :";
cin>>x;
while(c<n&&!found)
{
if(day[c]==30)
{
pos=c;
found=true;
}
else
c++;
}
if(found)
cout<<x<<" is found in location "<<pos<<endl;
else
cout<<x<<" is not found "<<endl;