www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Input

reply Jason <Jason_member pathlink.com> writes:
How do i do the following in D?

#include <iostream>

int main()
{
int i;
cin >> i;
cout << "number: " << i;
return 0;
}

thanks
Jul 05 2006
parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Jason" <Jason_member pathlink.com> wrote in message 
news:e8grq3$f2f$1 digitaldaemon.com...

 How do i do the following in D?

 #include <iostream>

 int main()
 {
 int i;
 cin >> i;
 cout << "number: " << i;
 return 0;
 }

import std.cstream; void main() { int i; din.readf(&i); dout.writefln("number: ", i); }
Jul 05 2006