Created
June 23, 2022 15:09
-
-
Save DeclanGas/ee75a3d528dbbdc48cd13455ca34d9d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cs50.h> | |
#include <stdio.h> | |
int main(void) | |
{ | |
int number; | |
// write your do-while loop here to accept input between 0 and 10 | |
do | |
{ | |
number = get_int("Enter a number between 0 and 10: "); | |
} | |
while (number < 0 || number > 10); | |
printf("Thank you for the %i!\n", number); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment