0.5% inseamna 0.005
#include <iostream>
using namespace std;
int main(){
double suma=1000,rata=50,dobanda=0.005;
int nr_luni=0,nr_ani;
while(suma>=0){
suma=suma+suma*0.005-50;
cout<<suma<<endl;
nr_luni++;
}
nr_ani=nr_luni/12;
nr_luni=nr_luni%12;
cout<<"Timpul in care sunt cheltuiti banii: "<<nr_ani<<" ani si "<<nr_luni<<" luni";
return 0;
}