Back To C++ Single Dimensional Arrays Index
//program to input an integer array of size 5 from the user and calculate total of the integer array using for loop #include
#include
void main() { int marks[5]; int i,total=0; clrscr(); for(i=0;i<5;i++) { cout<<"\nenter marks in subject "<
>marks[i]; total=total+marks[i]; } cout<<"total of marks in five subjects is "<