Skip to content

Instantly share code, notes, and snippets.

@Aaron2464
Created September 27, 2021 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aaron2464/52d26ed3ab37eab2070922e04b12cccc to your computer and use it in GitHub Desktop.
Save Aaron2464/52d26ed3ab37eab2070922e04b12cccc to your computer and use it in GitHub Desktop.
CODE TEST
// 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