#include<stdio.h>
#include<conio.h>
main()
{
char c;
printf("Enter the code for the chart: \n");
do
{
scanf("%c",&c);
switch (c)
{
case 'A':printf("Area Chart\n");break;
case 'B':printf("Bar Chart\n");break;
case 'U':printf("Bubble Chart\n");break;
case 'C':printf("Column Chart\n");break;
case 'N':printf("Cone Chart\n");break;
case 'Y':printf("Cylinder Chart\n");break;
case 'D':printf("Doughnut Chart\n");break;
case 'L':printf("Line Chart\n");break;
case 'I':printf("Pie Chart\n");break;
case 'P':printf("Pyramid Chart\n");break;
case 'R':printf("Radar Chart\n");break;
case 'S':printf("Scatter Chart\n");break;
case 'F':printf("Surface Chart\n");break;
case 'K':printf("Stock Chart\n");break;
default:printf("The code is not valid.\n);
}
}
while (c='\n');
getch();
}
whenever i type the code, it displays the kind of chart but also the default. how can i fix this? help me please. :(