Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- #include <cmath>
- #include <algorithm>
- using namespace std;
- double func(double U)
- {
- return 0;
- }
- int main()
- {
- FILE* f1 = fopen("input.txt", "r");
- FILE* f2 = fopen("output.txt", "w");
- double Uv = 0.0;
- double Uvih = 0.0;
- double dt = 1.0;
- double c = 1E-6;
- double Io = 1E-13;
- double R = 1E3;
- double q = 1.6 * 1E-19;
- double T = 298;
- int t;
- double k = 1.38 * 1E-23;
- double con = k * T / q;
- for (t = 1; t <= 10000; t+=1)
- {
- Uv = t*1.0;
- Uvih = ((Uv - Uvih)/R - Io * (exp(Uvih/con) - 1))/c + Uvih;
- fprintf(f2, "%d %f\n", t, Uvih);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement