How to make a table form to output the Failed/credited subject

void input_grades(void)
{
	clrscr();
	string subj[8]={"CHN11","ESN111","EN111", "ESN110","FI101","MAN 111","PEN 1","MAN 112"};
        
for(int x=0; x<=7; x++)
{	
gotoxy(26,8);
cout<<"Enter your grades for:"<<subj[x]<<"\n";
gotoxy(26,12);
cin>>grades;
if(grades<=3)
{
	gotoxy(26,11);
	cout<<"CREDITED"<<"\n";
	gotoxy(26,12);
	system("pause");
	clrscr();
}
else
{
	gotoxy(26,11);
	cout<<"FAILED"<<"\n";
	gotoxy(26,12);
	system("pause");
	clrscr();