How to use Power on D

Carlos checoimg at gmail.com
Wed Jun 12 17:35:33 PDT 2013


On Thursday, 13 June 2013 at 00:27:33 UTC, bearophile wrote:
> Carlos:
>
>> Thank you for your time.
>
> That's one bitwise operator. You want ^^
>
> Bye,
> bearophile

I didn't understoof in the first try but Infiltrator told me on 
the #d irc chat and here is the new code.

import std.stdio;
import std.c.stdlib;

void main()
{
foreach (count; 1 .. 16){
	write("Result : ", (2)^^(count), " from : ", count, "\n");
	}
}


More information about the Digitalmars-d-learn mailing list