while(!fin.eof())
{
for(int n=0;n<43;n++)
{
tempo.statename[n]=temp.name;
tempo.admission[n]=temp.order;
tempo.density[n]=temp.population/temp.area;
fin.read((char*)&temp,struct_size);
}
}
THE DENSITY=POPULATION/AREA;
ALASKA DENSITY
400481/586400=0.6829
//when I run the program it gives me 0 as a density. How can I round 0.6829 to 1.
My professor said use intfor density.