[ create a new paste ] login | about

Link: http://codepad.org/lnql0ntH    [ raw code | output | fork ]

C++, pasted on Oct 1:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
  float hauteur = 8, longueur = 12, largeur = 10;
  float volume;

  volume = hauteur * longueur * largeur/1000;

  printf("Dimensions: %lfx%lfx%lf\n", longueur, largeur, hauteur);
  printf("Volume (en metre cube): %lf\n", volume);
  printf("Prix du fret (En Fcp): %lf\n", (volume * 1200) );

  return 0;
}


Output:
1
2
3
4
5
6
7
cc1plus: warnings being treated as errors
In function 'int main()':
Line 11: warning: ISO C++ does not support the '%lf' printf format
Line 11: warning: ISO C++ does not support the '%lf' printf format
Line 11: warning: ISO C++ does not support the '%lf' printf format
Line 12: warning: ISO C++ does not support the '%lf' printf format
Line 13: warning: ISO C++ does not support the '%lf' printf format


Create a new paste based on this one


Comments: