topical media & game development

talk show tell print

professional-program-01-typetest-typetest.c

? / professional-program-01-typetest-typetest.c


  // typetest.cpp
  
  include <iostream>
  
  using namespace std;
  
  int main(int argc, char** argv)
  {
    int someInteger = 256;
    short someShort;
    long someLong;
    float someFloat;
    double someDouble;
  
    someInteger++;
    someInteger *= 2;
    someShort = (short)someInteger;
    someLong = someShort * 10000;
    someFloat = someLong + 0.785;
    someDouble = (double)someFloat / 100000;
  
    cout << someDouble << endl;
  }
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.