c# - Get variable value based on division of two integers -


i have count of messages if length of total message exceeds characters.

for example - english character limit 160 , arabic 70. if english message length <=160 count of variable should 1 else between 161 -320 count of variable should 2 , on . same in case of arabic if message length <=70 count of variable should 1 else between 71-140 count of variable should 2 , on.

how can achieve this?

thanks

this question not seem c# anyways. should use math.ceiling

console.write(math.ceiling((double)161 / 160)); 

this code return 2 want.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -