// this code help you to solve your problem
# include <iostream.h>
main ()
{
// array of salary
int salary[10] ;
do {
// prompt to the user
for (int i = 0 ; i < 10 ;i++)
cout << "Enter the salary ";
cin >> salary
// this loop go till that salary is greater than 0 means salar > 0
}while(salary[i] > 0 );
}