Exporting output.

closed account (9hUqko23)
Okay, this code works, but I need to know how to export my output information to an excel file or to an .txt file. can someone show me what I need to code and where?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include <iostream>
#include <iomanip>
#include <cmath>
#include <fstream>

using namespace std;

int main(void)
{
	int a, b, bb, c, d, e;
	char A, C;
	cout << "Input an alarm priority" << endl;
	cin >> a;
	if (a == 1)
	{
		//code to output all of the analog telemetries assigned priority of one
		cout << "Input PCB prefix" << endl;
		cin >> A;
		cout << "Input MEAG Equipment number" << endl;
		cin >> bb;
		cout << "PCB" << " " << "#" << A << "-" << bb << " " << "PHASE" << " " << "A(3)" << " " << "VOLTS" << endl;
		cout << "PCB" << " " << "#" << A << "-" << bb << " " << "PHASE" << " " << "B(2)" << " " << "VOLTS" << endl;
		cout << "PCB" << " " << "#" << A << "-" << bb << " " << "PHASE" << " " << "C(1)" << " " << "VOLTS" << endl;
		cout << "PCB" << " " << "#" << A << "-" << bb << " " << "PHASE" << " " << "A(3)" << " " << "AMPS" << endl;
		cout << "PCB" << " " << "#" << A << "-" << bb << " " << "PHASE" << " " << "B(2)" << " " << "AMPS" << endl;
		cout << "PCB" << " " << "#" << A << "-" << bb << " " << "PHASE" << " " << "C(1)" << " " << "AMPS" << endl;

		cout << "Enter a Regulator equiment prefix" << endl;
		cin >> C;
		cout << "Enter a Regulator equipment number" << endl;
		cin >> d;
		cout << "REGULATOR" << " " << "#" << C << "-" << d << " " << "PHASE" << " " << "A(3)" << " " << "VOLTS" << endl;
		cout << "REGULATOR" << " " << "#" << C << "-" << d << " " << "PHASE" << " " << "B(2)" << " " << "VOLTS" << endl;
		cout << "REGULATOR" << " " << "#" << C << "-" << d << " " << "PHASE" << " " << "C(1)" << " " << "VOLTS" << endl;
		cout << "REGULATOR" << " " << "#" << C << "-" << d << " " << "PHASE" << " " << "A(3)" << " " << "AMPS" << endl;
		cout << "REGULATOR" << " " << "#" << C << "-" << d << " " << "PHASE" << " " << "B(2)" << " " << "AMPS" << endl;
		cout << "REGULATOR" << " " << "#" << C << "-" << d << " " << "PHASE" << " " << "C(1)" << " " << "AMPS" << endl;
	}
	else if (a == 2)
	{
		cout << "code to out put all of the analog telemetries assigned priority of two." << endl;
	}
	else if (a == 3)
	{
		cout << "code to output all of the analog telemetries assigned priority of three." << endl;
	}
	else if (a == 4)
	{
		cout << "code to output all of the analog telemetries assigned priority of four." << endl;
	}
	else if (a == 0)
	{
		cout << "code to output all of the analog telemetries assigned priority of five." << endl;
	}
	else;
	{
		cout << "Not a recognized alarm priority" << endl;
	}
}
	
 
Topic archived. No new replies allowed.