Created
May 25, 2022 15:40
-
-
Save manvscode/dd5c90580d1e102f5a7ad151b9c0b46b to your computer and use it in GitHub Desktop.
Is first or second molar?
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 <stdio.h> | |
#include <stdbool.h> | |
static bool is_first_molar(int tooth) | |
{ | |
return tooth % 10 == 6; | |
} | |
static bool is_second_molar(int tooth) | |
{ | |
return tooth % 10 == 7; | |
} | |
int main() | |
{ | |
int max_fdi_number = 88; | |
printf("First Molars: "); | |
for( int i = 0; i < max_fdi_number; i++ ) | |
{ | |
if( is_first_molar(i) ) | |
{ | |
printf("%d ", i); | |
} | |
} | |
printf("\n"); | |
printf("Second Molars: "); | |
for( int i = 0; i < max_fdi_number; i++ ) | |
{ | |
if( is_second_molar(i) ) | |
{ | |
printf("%d ", i); | |
} | |
} | |
printf("\n"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment