Hello!

Sample program below:

===

#include <stdio.h>

#include <iostream.h>

int main(void)

{

double big = 2.3495939393949595949;

printf(“le gros numéro est %g et l’inverse est %g\n”,big, 1/big);

printf(“the big number is %g and the inverse is %g\n”,big, 1/big);

printf(“petit numéro: %d\n”,1);

printf(“small number: %d\n”,1);

# }

(hopefully, your mail reader is able to read french accented

characters…)

–(incorrect) Output under QNX6.1A:

$ g++ output.C -o output

$ ./output

le gros numéro est %g et l’inverse est %g

the big number is 2.34959 and the inverse is 0.425605

petit numéro: %d

small number: 1

$ qcc output.C -o output

$ ./output

le gros numéro est %g et l’inverse est %g

the big number is 2.34959 and the inverse is 0.425605

petit numéro: %d

small number: 1

–(correct) Output under Linux RH7.3:

[rngadam@sonia rngadam]$ g++ output.C -o output

[rngadam@sonia rngadam]$ ./output

le gros numéro est 2.34959 et l’inverse est 0.425605

the big number is 2.34959 and the inverse is 0.425605

petit numéro: 1

small number: 1

–Is there a solution to this?

Thanks,

–

Ricky Ng-Adam, stagiaire laboratoire de robotique

(450) 652-8499 x 2757, local BR0.50

Hydro-Québec, Montréal, Canada