infinity looping,c logical thinking : I'm facing a problem with what I enter with any unknown during the first time to the program.it will show me infinity problem program closing. The program won't read the else statement . I m tired with this


char cont;

		printf("Do u want continue\n");
		scanf("%c", &cont);
		getchar();
		do
		{
			if (next == 'y' || next == 'Y')
			{
				selection();
			}
			else if (next != 'n' || next != 'N')
			{
				printf("Program Closing \n");
			}
			else
			{
				printf("Invalid Please Re-enter");
				getchar();
				scanf("%c", &cont);
			}
		} while (next != 'n'&& next != 'N');