Skip to content

Commit

Permalink
addressing Fork, Commit, Merge - Easy Issue 3 (Dart) fork-commit-merg…
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaT-19 committed Dec 4, 2023
1 parent 87294e2 commit ad3387c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = HelloUser
build_property.ProjectDir = /home/nikohoffren/dev/open-source/fork-commit-merge-files/fork-commit-merge/tasks/c#/easy/HelloUser/
build_property.ProjectDir = c:\Users\beana\OneDrive - 123\Desktop\SJCE\fork-commit-merge\tasks\c#\easy\HelloUser\
Binary file modified tasks/c#/easy/HelloUser/obj/Debug/net7.0/HelloUser.assets.cache
Binary file not shown.
Binary file not shown.
Binary file not shown.
13 changes: 10 additions & 3 deletions tasks/dart/easy/mean_array.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
void main() {
// List<int> data = [5, 10, 15, 20, 25];
// double mean = calculateMean(data);
// print('Mean: $mean'); // Expected output: Mean: 15.0
List<int> data = [5, 10, 15, 20, 25];
double mean = calculateMean(data);
print('Mean: $mean'); // Expected output: Mean: 15.0
}

// TODO: Implement a function called 'calculateMean' that takes a list of integers as input and returns the mean as a double.

double calculateMean(List<int> data) {
double sum = 0;
for (int i = 0; i < data.length; i++) {
sum += data[i];
}
return sum / data.length;
}

0 comments on commit ad3387c

Please sign in to comment.