Z Code Writer is an Online Blog for beginner programmers. Here, you will find tech, build your Programming Skills and other Programming Languages like C, C++, HTML, JavaScript, Java Code, Web Designing and the University of Sialkot (USKT) CGPA / GPA Calculator, etc.

Showing posts with label 1D Array. Show all posts
Showing posts with label 1D Array. Show all posts

Saturday, 14 December 2019

1D Array

#include <iostream>
using namespace std;

int main()
{
    int arr[10],sum=0,i;
    cout<<"Enter 10 numbers"<<endl;
    for(i=0;i<10;i++)
    {
        cin>>arr[i];
        sum = sum+arr[i];
    }
    cout<<"Sum = "<<sum;
    return 0;
}