You are on page 1of 2

Summation of Array values

Submitted By:
Syed Idrees Hashmi
19011598-133
Course:
Formal Methods in Software Engineering
SE-426
Department:
BS Software Engineering (SE-6C)
Submitted To:
Mr. Asim
Date:
July 07, 2022

University of Gujrat
Hafiz Hayat Campus
Code
int main(int argc, char** argv) {
double arry[5];
int i ; double sum=0;
for( i=0; i<=5; i++) {
cout << "enter vale of index: "<< i << endl ;
cin >> arry[i];
}
for (i=0; i<=5; i++) {
sum=sum+arry[i];
}
cout << sum ;
return 0;
}

You might also like