Dart, didn't bother to deal with the float and use dynamic
dynamic
void pattern(int n) { if(n < 1) { print(" "); } for(var x = 1; x < n+1; x++) { print(x.toString() * x); } } pattern(4); pattern(8); // pattern(0.5); // fails, not an int lol // 1 // 22 // 333 // 4444 // 1 // 22 // 333 // 4444 // 55555 // 666666 // 7777777 // 88888888
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Dart, didn't bother to deal with the float and use
dynamic