-
Notifications
You must be signed in to change notification settings - Fork 0
/
cellsim.cpp
61 lines (48 loc) · 1.04 KB
/
cellsim.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
Cell/tissue response simulation module for LivMach Framework 1.3
Author: Shreyak Chakraborty (C) 2016
Multiple cells i.e. tissue are created using an array of "Cell" Type
*/
# include "livmach_cellenv.h"
int main()
{
int i,pass;
float stim; // the numeric value of the external stimulus
char x;
cell tissue[5];
cell Cell;
intro();
cout<<"Enter stimulus value";
cin>>stim;
cout<<"\n\nDefine tissue:";
for(i=0;i<5;i++)
{
cin>>tissue[i].tolerance;
}
cout<<"\n\nThe tissue response is-\n\t";
for(i=0;i<5;i++)
{
if(tissue[i].tolerance<stim)
tissue[i].life=0;
else
tissue[i].life=1;
cout<<tissue[i].life<<" ";
}
cout<<"\n\nPress a key to repair cells";
x=getche();
cout<<"\n";
for (i=0;i<5;i++)
{
tissue[i].life=repair(tissue[i]);
}
for (i=0;i<5;i++)
cout<<tissue[i].life<<" ";
cout<<"\nCells repaired successfully...";
cout<<"\n\n\nPress a key to start the experimental Digital DNA Module 1";
x=getch();
cout<<"\n\n Enter passcode";
cin>>pass;
Cell.cell_membrane(pass);
getch();
return 0;
}