#include <stdio.h>

int main(void) {
	int num;
	char c = 'a';

	while(c != '?')
	{
		if (scanf("%d", &num) == 1)
		{
    		printf("Okay you got an integer with value %d\n", num);
		}
		else if (scanf("%c", &c) == 1)
		{
    		// Okay you got a char
    		if (c == '?')
    		{
        		printf("You got your ? Program will end\n");
    		}
    		else
    		{
        		printf("Some other char, i.e. %c\n", c);
    		}
		}
		else
		{
		    // Input error that can't be recovered
    		exit(1);
		}
	}
	return 0;
}
