Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Loops-N-plus-one-half/Dart/loops-n-plus-one-half.dart
Normal file
15
Task/Loops-N-plus-one-half/Dart/loops-n-plus-one-half.dart
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
String loopPlusHalf(start, end) {
|
||||
var result = '';
|
||||
for(int i = start; i <= end; i++) {
|
||||
result += '$i';
|
||||
if(i == end) {
|
||||
break;
|
||||
}
|
||||
result += ', ';
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void main() {
|
||||
print(loopPlusHalf(1, 10));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue