Practice of Lab 005 (25 questions, unlimited attempts) (page 1 of 25)

PHOTO EMBED

Thu Apr 18 2024 09:15:20 GMT+0000 (Coordinated Universal Time)

Saved by @meanaspotato #c

#include <stdio.h>

int main(void)
{
	int number;
	//uncomment to make it pass:
    printf("Input an odd number between 0 and 8: \n");
	scanf("%d", &number);
	switch (number)
	{
		case 1:
			{
				printf("User input ONE\n");
				break;
			}

		case 3:
			{
				printf("User input THREE\n");
				break;
			}

		case 5:
			{
				printf("User input FIVE\n");
				break;
			}

		case 7:
			{
				printf("User input SEVEN\n");
				break;
			}

		default:
			{
				printf("User input does not match ");
				printf("the requirements!\n\n");
				printf("Should be 1, 3, 5, or 7.\n");
				break;
			}
	}

	return 0;
}
content_copyCOPY

https://codevalidator.aut.ac.nz/autmoodle1/mod/quiz/attempt.php?attempt