CS50 Week 1 – Mario

OK, so here’s the easier version of Mario. Probably could be better/simpler, but it works I think. Here’s just part –

#include <cs50.h>
#include <stdio.h>

int main(void)
{
    int i = get_int("Enter an int: ");

    while (i < 1 || i > 8) {
        printf("Bad input\n");
        i = get_int("Enter an int: ");
    }
    printf("Good input\n");
    

By brettstark

Aussie in Chicago

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.