
By: asd | Date: Dec 6 2006 18:05 | Format: C++ | Expires: never | Size: 662 B | Hits: 1257
- #include <cstdlib>
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- ifstream infile;
- ofstream outfile;
- infile.open("indata7.txt");
- outfile.open("outdata7.txt");
- const int SIZE = 15;
- int grades[SIZE];
- int i;
- int max = 0;
- for(i = 0;i <= SIZE; i++)
- {
- infile >> grades[i];
- if (grades[i]>max)
- max = grades[i];
- }
- for(i = 0;i <= SIZE; i++)
- outfile << " " << grades[i];
- outfile <<endl;
- outfile << max;
- system("PAUSE");
- return 0;
- }
Latest pastes
1 days ago
1 days ago
5 days ago
8 days ago
27 days ago