D语言变量声明

import std.stdio; 

int a = 10, b = 10; 
int c;
float f;  

int main () { 
   writeln(Value of a is : , a); 

   /* variable re deFinition: */ 
   int a, b; 
   int c; 
   float f;

   /* Initialization */ 
   a = 30; 
   b = 40; 
   writeln(Value of a is : , a); 

   c = a + b; 
   writeln(Value of c is : , c);  

   f = 70.0/3.0; 
   writeln(Value of f is : , f); 
   return 0; 
}

相关文章

// ------------------- import std.stdio; void main(str...
import std.stdio; int main () { /* local variable defi...
import std.stdio; int main(string[] args) { int a = 20...
import std.stdio; int main(string[] args) { int a = 4;...
import std.stdio; int main(string[] args) { int a = 21;...
import std.stdio; int main(string[] args) { uint a = 60...