Help me in solving POLYBAGS problem

My issue

include
include
using namespace std;

int main() {
// your code goes her
int t,a;
cin>>t;
for(int i=0;i<t;i++)
{
cin>>a;
if (a%10==0)
{
cout<<a/10<<endl;
}
else
{
double d= a/10;
cout<<d<<endl;
}
}
return 0;
}

My code

#include <iostream>
#include <cmath>
using namespace std;

int main() {
	// your code goes her
	int t,a;
	cin>>t;
	for(int i=0;i<t;i++)
	{
	    cin>>a;
	    if (a%10==0)
	    {
	        cout<<a/10<<endl;
	    }
	    else
	    {
	        double d= a/10;
	        cout<<d<<endl;
	    }
	}  
	return 0;
}

Problem Link: POLYBAGS Problem - CodeChef

@sarthak_kapse
In else case u have to print d+1 .
rest of your code is correct.