#include <iostream>
usingnamespace std;
int main()
{
int *p;
int x;
cout << "Enter a number of student: ";
cin >> x;
p = newint[x];
for (int i = 0; i < x; i++)
{
cout << "Enter a grade: ";
cin >> *(p + i);
}
int min = 0;
int secmin = 0;
min = *p;
for (int i=0; i<x; i++)
{
if (*(p+i) < min)
{
secmin = min;
min = *(p+i);
}
elseif( *(p+i) < secmin)
secmin = *(p+i);
/* else
{
secmin = *(p+i);
} */
}
cout << "Min num is : "<< min << "\nSecond Min num is: " << secmin << endl;
}