Skip to content

Instantly share code, notes, and snippets.

@whopiyush
Created December 4, 2018 08:19
Show Gist options
  • Select an option

  • Save whopiyush/e51ee495a2a6840ffb707ac69f722750 to your computer and use it in GitHub Desktop.

Select an option

Save whopiyush/e51ee495a2a6840ffb707ac69f722750 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main(){
int sum=0,a[5];
cout << "Enter Numbers!";
for(int i =0; i<5;i++){
cin >> a[i];
}
for(int j=0;j<5;j++){
sum = sum + a[j];
}
cout << " Sum Is: " << sum;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment