#include <stdio.h>

int main(void){
	int begin, end;

	printf("Please enter the beginning of the range: ");
	scanf("%d",&begin);
	
	printf("Please enter the end of the range: ");
	scanf("%d",&end);

	int i = begin;
	//print out the numbers counting up
	while (i <= end){
		printf("%d\n",i);
		i++;
	}

	//print out the numbers counting down
	for (i = end; i >= begin; i--){
		printf("%d\n",i);
	}

	return 0;
}
