#include <stdio.h>
int main()
{
int state,N; //declaration
int i,j;
printf("\nData you have: ");
scanf("%d",&N);
int list[3];
for(int i=0;i<3;i++)
// scanf("%d", &list[i]);
{
for(j=1;j<=N;j++){
printf("\nEnter the state:");
scanf("\n%d", &state);
{
if (state>=1 && state<=5)
{
printf("A");
}
else if (state>=6 && state<=10)
{
printf("B");
}
else if (state>=11 && state<=15)
{
printf("C");
}
else
{
printf("not valid");
}}
}
{
printf("\nelements are: ",state);
}
return 0;} }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Need help for this. I try using array but unable to call back the ABC output for the element. since the input is integer