Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int principleNum;
- ofstream myFile;
- int main()
- {
- cout << "How Many principes do you have?\n";
- cin >> principleNum;
- int* dList;
- dList = new int[principleNum];
- for (int k = 0; k < principleNum; k++)
- {
- cout << "Input Value\n";
- cin >> dList[k];
- cout << endl;
- }
- for (int i = 0; i < principleNum; i++)
- {
- cout << dList[i] << endl;
- }
- myFile.open("PrincipleNum.txt");
- if (myFile.is_open())
- {
- }
- delete[] dList;
- return 0;
- }
- //The array is called "dList".
- //Able to contain a user defined size and input values.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement