-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcircuit_schematic.cpp
More file actions
19 lines (18 loc) · 1.28 KB
/
circuit_schematic.cpp
File metadata and controls
19 lines (18 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
using namespace std;
int main() {
cout << "\033[0;37m +---------+ +---------+ \n";
cout << "\033[0;37m +----| " << setw(7) << fixed << setprecision(3) << R1 << " |--["
<< setw(6) << fixed << setprecision(3) << I1 << " A]----| " << setw(7) << R2 << " |----+ \n";
cout << "\033[0;37m | +---------+ | +---------+ | \n";
cout << "\033[0;37m | | | \n";
cout << "\033[0;37m [ " << setw(5) << V1 << "V ] | ["
<< setw(6) << I2 << " A] \n";
cout << "\033[0;37m | +---------+ | \n";
cout << "\033[0;37m | | " << setw(7) << R3 << " | +---------+\n";
cout << "\033[0;37m | +---------+ | " << setw(7) << R4 << " |\n";
cout << "\033[0;37m | | +---------+\n";
cout << "\033[0;37m | +---------+ | | \n";
cout << "\033[0;37m +------| " << setw(7) << R5 << " |------+--[ " << setw(5) << V2 << "V ]----------+ \n";
cout << "\033[0;37m +---------+ \033[0m\n";
}