The program continues only if the user presses "Enter" in two cases. But my program doesn't wait for the user to press "Enter" at all and moves on to the next line of the code.
int T1 ,T2;
char c1,c2;
printf("Enter Temperature T1: ");
scanf("%d",&T1);
printf("Enter Temperature T2: ");
scanf("%d",&T2);
printf("Press Enter after setting temperature T1\n");
scanf("%c",&c1);
while(c1 != '\n' && c1 != EOF);
printf("Press Enter after setting temperature T2\n");
scanf("%c",&c2);
while(c2 != '\n' && c2 != EOF);