#include<stdio.h>
int main()
{
int a,b;
char i;
do{
scanf("%d%d",&a,&b);
printf("%d\n",b-a);
}while(a!=EOF);
return 0;
}
In this program when i press ctrl+z(EOF) it doesn't terminate.It print the last value and continue until I close the output console manually.What's the problem here?