Two similar codes, when they are run on two different computers, give two right answers, but they look different. How could it be explained? The aim is to calculate A+B.
Input: 1000000000 1000000000
Output-1: 2000000000
Output-2: 2e+009
#include <iostream>
#include <fstream>
using namespace std;
int main(){
ifstream cin("input.txt");
ofstream cout("output.txt");
int a, b;
cin >> a >> b;
cout << a + b;
return 0;
}