/******************************************************************************
Welcome to code of Lập trình - Điện tử
Series: C++
Author: Nghĩa Taarabt
*******************************************************************************/
#include <iostream>
using namespace std;
void display(int marks[5])
{
cout << "Displaying marks: " << endl;
// display array elements
for (int i = 0; i < 5; ++i)
{
cout << "Student " << i + 1 << ": " << marks[i] << endl;
}
}
int main()
{
// declare and initialize an array
int marks[5] = {88, 76, 90, 61, 69};
// call display function
// pass array as argument
display(marks);
return 0;
}