i made an odd loop. when i press 'y' , i want to continue the loop but it does not. any one can give me a solution?
program is given below..
Code:#include<stdio.h> #include<conio.h> void main() {int n; char i='y'; if(i=='y') {printf("Enter a number : "); scanf("%d",&n); printf("\nSquare of %d is %d",n,n*n); printf("\nWould you like to enter another number? (y/n)"); scanf("%c",&i); } getch(); clrscr(); }