Skip to content

Instantly share code, notes, and snippets.

@tecoholic
Created March 14, 2013 11:38
Show Gist options
  • Save tecoholic/5160692 to your computer and use it in GitHub Desktop.
Save tecoholic/5160692 to your computer and use it in GitHub Desktop.
A Sample program that illustrated a bug in the compiler, that I am using.
#include <iostream>
using namespace std;
int main()
{
int res;
float fres;
float big = 1600;
float small = 3.2;
res = big / small;
fres = big / small;
cout<< "Int: " << res << endl;
cout<< "Float: "<< fres << endl;
return 0;
}
/* Output:
Int: 499
Float: 500
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment