Created
March 14, 2013 11:38
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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