Public feed
#527220
#include <stdio.h>
// this is some of the worst C ever written: give up now jackass, you'll never be any type of programmer, might as well start cleaning toilets for a living
main()
{
char artist[21];
char title[36];
short numtracks;
char type[2];
char type2[2];
int album;
float price;
{
printf("Enter the artist name: ");
scanf("%[^\n]", artist);
printf("\n");
}
fflush(stdin);
{
printf("Enter the title of the CD: ");
scanf("%[^\n]", title);
} printf("\n");
{
printf("Enter the number of tracks on the CD: ");
scanf("%d", &numtracks);
} printf("\n");
fflush(stdin);
enteragain:
{
printf("Is the CD a single? Please press y/n: ");
fflush(stdin);
scanf("%c", &type);
printf("\n");
if (strcmp(type, "y") != 0)
goto albumlabel;
else
goto skipnext;
}
fflush(stdin);
albumlabel:
{
printf("Is the CD an album? Please press y/n: ");
fflush(stdin);
scanf("%c", &type2);
printf("\n");
if (strcmp(type2, "y") != 0)
goto enteragain;
}
skipnext:
printf("You are done\n");
fflush(stdin);
getchar();
}