I don't know why my code is giving to me incorrect results.
When I put a number like 6670680902
the result is 6.67068e+0.7
(which is 66706800
). That is not the correct result.
When I use the calculator the correct result of 667006080902 / 100
is 66706809.02
.
What should I do to fix it?
#include "stdafx.h"
#include "conio.h"
#include "iostream"
using namespace System;
using namespace std;
int main()
{
float a;
float b;
cout << "Ingrese el codigo: "; cin >> a;
b = a / 100;
cout << "result: " << b;
_getch();
return 0;
}