#include<iostream>
#include<string>
using namespace std;
int main()
{
const int SIZE=7;
string tuition[SIZE];
tuition[0]="Student ID";
tuition[1]="total financial aid recieved";
tuition[2]="amount paid for tuition";
tuition[3]="amount paid for fees";
tuition[4]="amount paid for books";
tuition[5]="amount paid for housing";
tuition[6]="amount paid for meal plan";
int costs[SIZE];
for(int index =0;index < SIZE;index++)
{
cout<<"Please enter your "<<tuition[index]<<endl;
cin>>costs[index];
do{
return 0;
}while(costs[0] == 0);
do{
cout<<"Please re-enter the correct data.\n";
cin>>costs[1];
}while(costs[1] < 0);
}
return 0;
}
when the code is being run It executes the conditional code even when the conditional statement is false. I'm confused as to why that is happening.