Skip to content

Instantly share code, notes, and snippets.

@run-dlang
Created September 29, 2023 14:56
Show Gist options
  • Save run-dlang/d4fdbed93831d9009a0a12f59d622141 to your computer and use it in GitHub Desktop.
Save run-dlang/d4fdbed93831d9009a0a12f59d622141 to your computer and use it in GitHub Desktop.
Code shared from run.dlang.io.
import std.stdio;
void main()
{
int[] a = [1, 2, 3, 4];
char[] nameN = ['J', 'O', 'H', 'N'] ~ [' ', 'D', 'O', 'E'];
char e = 'E';
char lettreE = 'E';
float D = 343;
double O = D + 322 / 1.5;
writeln("La valeur de e: ", e);
writeln(typeid(e));
writeln(e.sizeof);
writeln("La valeur de lettreE: ", lettreE);
writeln(typeid(lettreE));
writeln(lettreE.sizeof);
writeln(cast(int) lettreE.min);
writeln(cast(int) lettreE.max);
writeln("La valeur de D = ", D);
writeln(typeid(D));
writeln(D.sizeof);
writeln("La somme de la vente = ", O);
writeln("La suite de nombre est: ", a);
writeln("Le futur chef sera: ", nameN);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment