Jump to content
xisto Community
Sign in to follow this  
CrazyPensil

Decrementing Number Of Digits Ofter Point In C#

Recommended Posts

How to check the ODD or Even Number??

Decrementing Number Of Digits Ofter Point

 

Let me know how will I check the the given number is odd or Even numbers? Can you Help me! Give me a logic

 

-question by Ramesh

Share this post


Link to post
Share on other sites
how to limit to numbers after the point in calculator program in C#Decrementing Number Of Digits Ofter Point

Hi,

I am writing a financial calculator  program in C# and want to limit the No. Of digits after the Point button is clicked because it is only used for money, so only tow more digits can be typed. I used the indexof('.').ToString.Length == 2. But it did not work. 

Do you have any idea. 

-question by Omer

 

Share this post


Link to post
Share on other sites
to get number is odd or evenDecrementing Number Of Digits Ofter Point

just do this

let the given number be and

then

int p=and%2

if(p==0)

then its even else it is a odd number

 

-reply by guest

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.