1. Course
  2. Functions A
  3. Function to add an array of integers

Function to add an array of integers


Last updated: 8/23/2020 Difficulty: Intermediate

Create a C# program that asks the user for 5 integers to store them in an array of integers. Then you must implement a function called Add that accepts that parameter an array of integers. Finally show the result on the screen.

Input

5
2
5
3
1

Output

16

Solution

Functions A

6 / 9

Android App


Practice C# anywhere with the free app for Android devices.

Android App

Exercises C# by difficulty


Learn C# at your own pace, the exercises are ordered by difficulty.

Make a donation


Your donations support our work and contribute to the maintenance of the app.

Advertising