Solved

Check if something is devisible by 11.

Posted on 2004-05-01
2
332 Views
Last Modified: 2006-11-17
Goodmorning,

I need to check the devisiblilty of a number by 11. It is to check if a bank account is valid or not.
How do I do that in an elegant manner in C#?

thanks
Marco
0
Comment
Question by:EnolaKotrotsos
2 Comments
 
LVL 15

Accepted Solution

by:
Timbo87 earned 125 total points
ID: 10970402
int acctNum = 99;
if(acctNum % 11 == 0)
     // number is divisible by 11
else
     // number is NOT divisible by 11
0
 
LVL 1

Author Comment

by:EnolaKotrotsos
ID: 10970412
Thanks Timbo. I totally forgot....
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question