Created
September 27, 2021 20:16
-
-
Save Aaron2464/52d26ed3ab37eab2070922e04b12cccc to your computer and use it in GitHub Desktop.
CODE TEST
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
// prints each number from 1 to 100 on a new line. | |
// For each multiple of 3, print "Bud" instead of the number. | |
// For each multiple of 5, print "Vue" instead of the number. | |
// For numbers that are multiples of both 3 and 5, | |
// print "Budvue should consider $yourName for this position" instead of the number | |
void main() { | |
String yourName = 'Aaron'; | |
for (int i = 1; i <= 100; i++) { | |
if(i % 15 == 0){ | |
print("Budvue should consider $yourName for this position"); | |
}else if (i % 5 == 0){ | |
print('Vue'); | |
}else if (i % 3 == 0){ | |
print('Bud'); | |
}else{ | |
print(i); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment