Code:
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <stdlib.h>
int main()
{
int horizontal,vertical,k;
char poz;
printf("Enter the horizontal position of queen(A-H)\n");
scanf("%s", &poz);
if(poz=='A')
{
horizontal=1;
}
else if (poz=='B')
{
horizontal=2;
}
else if (poz=='C')
{
horizontal=3;
}
else if (poz=='D')
{
horizontal=4;
}
else if (poz=='E')
{
horizontal=5;
}
else if (poz=='F')
{
horizontal=6;
}
else if (poz=='G')
{
horizontal=7;
}
else if (poz=='H')
{
horizontal=8;
}
printf("Enter the vertical position of queen(1-8)\n");
scanf("%d", vertical);
int chess[8][8]={
{1,2,3,4,5,6,7,8},
{1,2,3,4,5,6,7,8},
{1,2,3,4,5,6,7,8},
{1,2,3,4,5,6,7,8},
{1,2,3,4,5,6,7,8},
{1,2,3,4,5,6,7,8},
{1,2,3,4,5,6,7,8},
{1,2,3,4,5,6,7,8},
};
}