Not able to pass largest number. Code below

#include
#include<bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
int largest= INT_MIN;
int num;
for(int i=1; i<=n; i++)
{
cin>>num;
if(num>largest)
{
largest=num;
}
}
cout<<largest;
}

hi @jharshitjindal_4da85e4d0b87909f u r not given n as input which u r taking, make it equal to 3 and remove next line i.e cin>>n