#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

void main()
{
	int myAge;
	char choice;

	printf("Welcome to my chat room, you must be over 18 and follow the rules");

	printf("How old are you?");
	scanf("%d", &myAge);

	printf("\n\nDo you agree to follow the rules?(y/n)");
	scanf(" %c", &choice);

	if (myAge >= 18 && choice == 'y')
	{
		printf("\n\nYou're in!");
	}
	else
	{
		printf("\n\nGo away");
	}

}