There is a code:
#include <iostream> #include <cmath> using namespace std; int main() { int a, b, k; a = 67865; b = 67864; cout.precision(8); for (int i = a, j = b; i < a + 100, j < b + 100; i++, j++) { cout << fixed << (double) i / j << endl; k++; } system("pause"); return 0; } In the fact that it was displayed on the screen you need to remove 1.0000 on each line, I don’t know how to do this .. Help (The numbers should be 4 digits)
1473-1471, or what? Then simply subtract one from thei / jresult and multiply it by 100,000,000. Drop the fractional part (cout.precision(0)?) And get what you want. But what does C ++ do with it, this is arithmetic for elementary school. Or maybe something I did not understand? - PinkTux pm