View Full Version : [C#Help]

02-28-2010, 03:32 PM
I got a question in C# i cant solve -
Make an Boolean action X(int x,int y)

Input - the action recieves (number(x),digit(y)
exit - action returns True if y is in x else False

static bool X(int x,int y)
int temp=0;
while (x != 0)
temp = x % 10;
x = x / 10;
if ( temp == y)
return true;
return false;

B) Write a program that PRINTS the number of diffrent digits from each other(Example: 24462 has 3 diffrent digits) Use Action A)

My question is How the **** do i use Action A to do this **** cause Action A is Boolean!!!

Please help

02-28-2010, 03:43 PM
for (i=0;i<9;i++)
if (X(input,i)==TRUE)