So.... Is everyone using C#??
I recognize that <studio.h> header
um, No. most of it is in C
and it's <stdio.h> the Standard C library I/O functions,
void swap(int* a,int*
*b=*b+*a;
*a=*b-*a;
*b=*b-*a;
}
Posted 19 February 2010 - 10:56 AM
So.... Is everyone using C#??
I recognize that <studio.h> header
um, No. most of it is in C
and it's <stdio.h> the Standard C library I/O functions,
Posted 20 February 2010 - 05:20 PM
SigFlup, Could you explain how yours works. I'm curious to know what's happening there.
Posted 18 May 2010 - 12:34 AM
Edited by z3ros3c, 18 May 2010 - 12:36 AM.
Posted 13 September 2010 - 09:52 AM
Edited by Lord Wud, 13 September 2010 - 09:52 AM.
Posted 22 October 2010 - 01:43 PM
Posted 04 March 2011 - 09:18 PM
Posted 22 May 2011 - 12:58 PM
Posted 22 May 2011 - 02:11 PM
In python:
a = 10
b = 20
a = a*2
b = a/2
Is this too simplified??
Posted 22 May 2011 - 03:08 PM
In python:
a = 10
b = 20
a = a*2
b = a/2
Is this too simplified??
It's not too simplified (it does take two variables and swap them) but it doesn't do it in a general way, it will only work for certain numbers (i.e., where b = 2a).
Try and come up with a solution which can work for an arbitrary pair of numbers.
Posted 09 December 2012 - 06:14 AM
a = 2 b = 3 print a, b a, b = b, a print a, b
BinRev is hosted by the great people at Lunarpages!