Skip to content

Instantly share code, notes, and snippets.

@muchirijane
Created September 16, 2019 15:43
Show Gist options
  • Save muchirijane/b8ad7510b93fab2b881eba593d7525ee to your computer and use it in GitHub Desktop.
Save muchirijane/b8ad7510b93fab2b881eba593d7525ee to your computer and use it in GitHub Desktop.
//Challenge: Without changing the main() function, can you make this code work and get the result printed in the console?
void main() {
int step1Result = add(n1: 5, n2: 9);
print(step1Result);
int step2Result = multiply(step1Result, 5);
double finalResult = step2Result / 3;
print(finalResult);
}
int add({int n1, int n2 }){
return n1+n2;
}
int multiply(int n1, int n2){
return n1 * n2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment