int main ()
{
double dollars, amount, interest, formula;
int days, rate;
int b=100;
bool notValid;
int a=1;
do{
notValid=false;
cout << "\nInitial amount in dollars? " ;
cin >> dollars;
if (dollars <10 || dollars >10000)
{
cout << "\nDollar amount should be between 10 and 10000";
notValid=true;
}
} while (notValid);
do{
notValid=false;
cout << "\nInterest rate in percentage? " ;
cin >> rate;
if (rate <1 || rate >22)
{
cout << "\nInterest rate should be between 1 and 22";
notValid=true;
}
} while (notValid);
do{
notValid=false;
cout << "\nNumber of days? " ;
cin >> days;
if (days<2 || days >30)
{
cout << "\nNumber of days should be between 2 and 30";
notValid=true;
}
} while (notValid);