-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcontrast.cpp
More file actions
34 lines (25 loc) · 1.09 KB
/
Copy pathcontrast.cpp
File metadata and controls
34 lines (25 loc) · 1.09 KB
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
#include "contrast.h"
float calculateContrast(){
cout << endl;
cout << " ------------------------------------ " << endl;
cout << " ------------------------------------ " << endl;
cout << " Calculating Contrast " << endl;
cout << " ------------------------------------ " << endl;
float A = 0 ,B = 0, C = 0;
cout << endl;
cout << " Input the following " << endl;
cout << endl;
cout << " ------------------------------------ " << endl;
cout << " Normal Count Density ? \t " ;
cin >> A;
cout << " ------------------------------------ " << endl;
cout << " Abnormal Count Density ? \t ";
cin >> B;
C = (A - B)/A;
cout << " ------------------------------------ " << endl;
cout << " ------------------------------------ " << endl;
cout << " The Contrast is " << C << endl;
cout << " ------------------------------------ " << endl;
cout << " ------------------------------------ " << endl;
return C;
}