Created
February 13, 2024 00:16
-
-
Save jmichalenko/83e753bfda537a632d72b54e5f798ed6 to your computer and use it in GitHub Desktop.
CS50 Labs Booleans Starter Code
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) | |
{ | |
// Get grade as a number | |
int grade = get_int("Enter your grade: "); | |
// grades between 90 and 100 get an A | |
printf("You get an A!\n"); | |
// grades between 80 and 89 get a B | |
printf("You get a B!\n"); | |
// only grades between 70 and 79 get a C | |
printf("You get a C!\n"); | |
// all other need improvement | |
printf("You need to work harder to pass this class!\n"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment