-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1.cpp
41 lines (40 loc) · 810 Bytes
/
1.cpp
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
#include<map>
#include<list>
#include<cmath>
#include<queue>
#include<stack>
#include<cstdio>
#include<vector>
#include<iomanip>
#include<cstring>
#include<iterator>
#include<iostream>
#include<algorithm>
#define R register
#define LL long long
#define pi 3.141
#define INF 1400000000
using namespace std;
int main(){
double number1[3], number2[3], number3[3];
printf("请输入电阻臂:");
for(R int i = 0; i < 3; ++ i){
cin >> number1[i];
}
printf("\n请输入变化量:");
for(R int i = 0; i < 3; ++ i){
cin >> number2[i];
}
printf("\n请输入偏转格数:");
for(R int i = 0; i < 3; ++ i){
cin >> number3[i];
}
double answer = 0;
for(R int i = 0; i < 3; ++ i){
answer += number3[i] / number2[i] * number1[i];
}
answer /= 3;
printf("直流电桥灵敏度:%.2lf", answer);
system("pause");
return 0;
}