On Monday, 13 July 2015 at 14:29:57 UTC, Steven Schveighoffer
wrote:
On 7/11/15 12:57 PM, flamencofantasy wrote:
On Thursday, 9 July 2015 at 15:14:43 UTC, Binarydepth wrote:
This is my code :
import std.stdio : writeln, readf;
void main(){
int[3] nums;
float prom;
foreach(nem; 0
On Saturday, 11 July 2015 at 16:57:55 UTC, flamencofantasy wrote:
On Thursday, 9 July 2015 at 15:14:43 UTC, Binarydepth wrote:
This is my code :
import std.stdio : writeln, readf;
void main() {
int[3] nums;
float prom;
foreach(nem; 0..2) {
writeln
On 7/11/15 12:57 PM, flamencofantasy wrote:
On Thursday, 9 July 2015 at 15:14:43 UTC, Binarydepth wrote:
This is my code :
import std.stdio : writeln, readf;
void main(){
int[3] nums;
float prom;
foreach(nem; 0..2){
writeln("input a number : ");
readf(" %d", &
On Thursday, 9 July 2015 at 15:14:43 UTC, Binarydepth wrote:
This is my code :
import std.stdio : writeln, readf;
void main() {
int[3] nums;
float prom;
foreach(nem; 0..2) {
writeln("input a number : ");
readf(" %d", &nums[nem]);
On 7/9/15 1:04 PM, bachmeier wrote:
On Thursday, 9 July 2015 at 15:18:18 UTC, Adam D. Ruppe wrote:
On Thursday, 9 July 2015 at 15:14:43 UTC, Binarydepth wrote:
float prom;
You didn't initialize this variable. Set it to 0.0 and it will work.
Like how pointers are initialized to null autom
On Thursday, 9 July 2015 at 17:04:43 UTC, bachmeier wrote:
Is there a reason the compiler doesn't identify this as an
error?
The compiler just doesn't really try to trace if variables have
actually been initialized or not. It punts it to runtime for
simplicity of compiler implementation.
On Thursday, 9 July 2015 at 15:18:18 UTC, Adam D. Ruppe wrote:
On Thursday, 9 July 2015 at 15:14:43 UTC, Binarydepth wrote:
float prom;
You didn't initialize this variable. Set it to 0.0 and it will
work.
Like how pointers are initialized to null automatically in D,
floats are auto
On Thursday, 9 July 2015 at 15:18:18 UTC, Adam D. Ruppe wrote:
On Thursday, 9 July 2015 at 15:14:43 UTC, Binarydepth wrote:
float prom;
You didn't initialize this variable. Set it to 0.0 and it will
work.
Like how pointers are initialized to null automatically in D,
floats are auto
On Thursday, 9 July 2015 at 15:14:43 UTC, Binarydepth wrote:
float prom;
You didn't initialize this variable. Set it to 0.0 and it will
work.
Like how pointers are initialized to null automatically in D,
floats are auto initalized to NaN in D. The idea is to make use
of an uninitia
This is my code :
import std.stdio : writeln, readf;
void main() {
int[3] nums;
float prom;
foreach(nem; 0..2) {
writeln("input a number : ");
readf(" %d", &nums[nem]);
prom+=nums[nem];
}
writeln(prom/
10 matches
Mail list logo