i want this code to keep executing until i enter 'n'. it sort of work in the sense that the loop exit when i enter 'n' and the first loop is executed ok but when i enter 'y' the two print statement is printed twice on the output.
Code:#include <stdio.h> int main() { char a='y'; while(a!='n') { printf("testing testing testing"); printf("do you want to continue y or n"); scanf("%c",&a); } }