int n,m;
float S,K,R,L,dr,dz;
S=4.0f;
K=2.0f;
R=1.0f;
L=2.0f;
dr=0.01f;
dz=0.1f;
n=int((R/dr)+1);
m=int((L/dz)+1);
printf("%d\t%d\t",n,m);
for this iam getting 10,20 grid points but actually the value should be 11,21 for n,m rply and for dr=0.01 its printing n=101 except this all other values of 'dr' it printing one value less like for dr=0.1 n=10 ,dr=0.001 n=1000 but actual value is 1001.please kindly explain me sir a have been trying it since one month still i didnt get the correct answer..