#include <iostream>
#include <fstream>
usingnamespace std;
main()
{
float x,y,z,dar,a[10];
int td,f,co,i=0;
cin>>co; //Processing times
while(co>=0){
ofstream list("list.txt",ios::app);
cout<<"first number:";
cin>>x;
cout<<"second number:";
cin>>y;
x*=100; //proccess on fist and second number step 1
z=(x/y); //proccess on fist and second number step 2
z-=100; //proccess on fist and second number step 3
i++;
a[i]=z;
list<<'%'<<a[i]<<endl;
co--;
}
for(td=0;td<=i;td++)
cout<<a[i];
}
read this code but why whene while repeats only cout second process time