i have a setup where i intend to measure arduino's own battery level. the input supply is 6v so i used scaling resistors to scale down 6v to o-5v. this is the following code which i am using to measure the voltage.
//setup code
//loop code
int battLevel = analogRead(A0);
float volt = battLevel*(5.0/1023.0);
int percent = volt/5*100;
i am getting a 100% level even if the input voltage is less than 6V...