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

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

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

javascript - Restarting Supervisor and effect on FlaskSocketIO -