|
|
вернуться в форумCrash ( access violation ) why ? #include <iostream> #include <fstream> #include <iomanip> #include <cmath> using namespace std; int main() { ifstream f("input.txt"); ofstream o("output.txt"); int n=0; long double a[100]; long double k; f >> k; while(!f.eof()) { a[n] = sqrt(k); n++; f >> k; } for ( int i=n-1 ; i >= 0 ; i-- ) o << fixed << setprecision(4) << a[i] << endl; return 0; } Re: Crash ( access violation ) why ? size of array a = 100 is not enought to solve a[i]. size of array maybe more than 1 million double :D I think so Edited by author 25.06.2012 21:43 Re: Crash ( access violation ) why ? size of array maybe more than 1 million double :D I think so size of array maybe not more than 131072 values Re: Crash ( access violation ) why ? size of array maybe not more than 131072 values So that couldn't use array to save |
|
|