Please see my code

@Nikhil-Jettley-2567269533523013,
cin>>n1,n2;
should be
cin>>n1>>n2;