saptarshisarkar20 / Novice-Coding

Helping everyone to code and creating pull requests
19 stars 34 forks source link

Write a code to Solve the Hackerrank Simple Array Sum Problem [C, C++, Python, Java, JS, Php] #7

Closed saptarshisarkar20 closed 2 years ago

saptarshisarkar20 commented 3 years ago

Simple Array Sum

Problem link : https://www.hackerrank.com/challenges/simple-array-sum/problem

Statement

Given an array of integers, find the sum of its elements.

For example, if the array arr = [1,2,3] so return 6

Function Description

Complete the simpleArraySum function in the editor below. It must return the sum of the array elements as an integer. simpleArraySum has the following parameter(s): ar: an array of integers

Input Format

The first line contains an integer n, denoting the size of the array. The second line contains space-separated integers representing the array's elements.

Constraints

0 <= n,arr[i] <= 1000

Output Format

Print the sum of the array's elements as a single integer.

Sample Input

6
1 2 3 4 10 11

Sample Output

31

Explanation

We print the sum of the array's elements: 1+2+3+4+10+11 = 31

Rules

How to name your file?

  1. Go to folder : "/HackerRank/Simple Array Sum/"
  2. Take today's date, i.e. 1stOct
  3. Take your GitHUB username id like "hrithik339", "hacker-boy", etc or anything which you have.
  4. File extension = say ".py" .

This will ensure no file will be conflict and any number of contributors can work on the same issue. If you have any query ask in comments below, kindly follow this pattern strictly.

arihantthriwe commented 3 years ago

Please assign me this :)

saptarshisarkar20 commented 3 years ago

Please assign me this :)

No need to wait for getting assigned, you can go ahead attempt the issues and raise a PR.

arihantthriwe commented 3 years ago

OK thanks :)

RaghavvGupta commented 3 years ago

Is this issue still available, I would like to contribute in C++

shreygupta2101 commented 3 years ago

Please assign this issue to me, I can solve this in java.

Sayantan-Bera commented 3 years ago

I opened a pull request on this issue but its showing not a part of hactoberfest. Can you help me with that please.

Nikita-Shrma commented 2 years ago

@saptarshisarkar20 pls assign me this issue

cereal-hecker commented 2 years ago

hey, pls assign this to me, i'd like to contribute in cpp

saptarshisarkar20 commented 2 years ago

hey, pls assign this to me, i'd like to contribute in cpp

Please find the issue in my other repository Hacktoberfest2022