int volume;
cout<<"Please Enter Volume of Shampoo";
cin>>volume;
if (volume%5 == 0)
{
int su,volume;
double concen;
volume = 100;
su = (volume * concen) / (volume + 5);
cout<<su<<" " <<volume;
}
else
cout<<"error";
how can i make a loop that will result to this
1 Concentration: 90.00% Volume: 50 ml
2 Concentration: 81.00% Volume: 50 ml
3 Concentration: 72.90% Volume: 50 ml
4 Concentration: 65.61% Volume: 50 ml
5 Concentration: 59.05% Volume: 50 ml
6 Concentration: 53.14% Volume: 50 ml
7 Concentration: 47.83% Volume: 50 ml
it will stop when the concentration hits 50 the concentration here is 47.83 because of the formula it doesnt matter but how can i display that it lowers until 50 what looping statement i will use and how to use it?