Skip to main content
added 41 characters in body
Source Link
Abel Tom
  • 1.2k
  • 1
  • 7
  • 10

C 26 24 19 bytes

f(c,d){return!c+d;}

Ungolfed version:

int f(int c,int d)
{
   return !c+d; 
}

I hope I got the specification right. Can definitely be shortened!?

@Pavel Thanks for saving 2 bytes

@Neil Thanks for your input.

C 26 24 19 bytes

f(c,d){return!c+d;}

Ungolfed version:

f(c,d)
{
   return!c+d; 
}

I hope I got the specification right. Can definitely be shortened!?

@Pavel Thanks for saving 2 bytes

C 26 24 19 bytes

f(c,d){return!c+d;}

Ungolfed version:

int f(int c,int d)
{
   return !c+d; 
}

I hope I got the specification right. Can definitely be shortened!?

@Pavel Thanks for saving 2 bytes

@Neil Thanks for your input.

removed space after `return` , removed return datatype int
Source Link
Abel Tom
  • 1.2k
  • 1
  • 7
  • 10

C 26 2424 19 bytes

int f(c,d){return !c+d;}

Ungolfed version:

int f(int c,  int d)
{
   return !c+d; 
}

I hope I got the specification right. Can definitely be shortened!?

@Pavel Thanks for saving 2 bytes

C 26 24 bytes

int f(c,d){return !c+d;}

Ungolfed version:

int f(int c,  int d)
{
   return !c+d; 
}

I hope I got the specification right. Can definitely be shortened!?

@Pavel Thanks for saving 2 bytes

C 26 24 19 bytes

f(c,d){return!c+d;}

Ungolfed version:

f(c,d)
{
   return!c+d; 
}

I hope I got the specification right. Can definitely be shortened!?

@Pavel Thanks for saving 2 bytes

removed useless brackets
Source Link
Abel Tom
  • 1.2k
  • 1
  • 7
  • 10

C 2626 24 bytes

int f(c,d){return (!c+d);c+d;}

Ungolfed version:

int f(int c,  int d)
{
   return (!c+d);c+d; 
}

I hope I got the specification right. Can definitely be shortened!?

@Pavel Thanks for saving 2 bytes

C 26 bytes

int f(c,d){return (!c+d);}

Ungolfed version:

int f(int c,  int d)
{
   return (!c+d); 
}

I hope I got the specification right. Can definitely be shortened!?

C 26 24 bytes

int f(c,d){return !c+d;}

Ungolfed version:

int f(int c,  int d)
{
   return !c+d; 
}

I hope I got the specification right. Can definitely be shortened!?

@Pavel Thanks for saving 2 bytes

Source Link
Abel Tom
  • 1.2k
  • 1
  • 7
  • 10
Loading