-
Notifications
You must be signed in to change notification settings - Fork 0
/
merge.cpp
130 lines (89 loc) · 2.85 KB
/
merge.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#include "rect.cpp"
#include "circular.cpp"
#include "hollowcircle.cpp"
#include "holrec.cpp"
#include<stdio.h>
#include<conio.h>
#include<Math.h>
#include<iostream>
static int first_choice;
int main()
{
std::cout<<"The units used in calculations adn the result are : -\nForce - N\nLength - m\n";
std::cout<<"==============================";
std::cout<<"\n\n\nEnter the Beam type \n\n";
std::cout<<"1 == Solid rectangular beam\n";
std::cout<<"2 == Circular beam\n";
std::cout<<"3 == Hollow Circular beam\n";
std::cout<<"4 == Hollow Rectangular beam\n";
std::cout<<"Enter your choice: ";
std::cin>>first_choice;
switch(first_choice)
{
case 1:
{
Rect a;
std::cout<<"\n\n\n\ You have chosen A solid rectangualar beam\n";
a.Dimensions();
a.no_of_loads();
a.location_magnitude();
a.reactions();
a.Inertia();
double moments[a.no_of_load_var];
a.moments_finder(moments);
double bending_stress_array[a.no_of_load_var];
a.bending_stress(bending_stress_array,moments);
break;
}
case 2:
{
Circular b;
std::cout<<"\n\n\n\ You have chosen A Circular beam\n";
b.Dimensions1();
b.no_of_loads1();
b.location_magnitude1();
b.reactions1();
b.Inertia1();
double moments1[b.no_of_load_var1];
b.moments_finder1(moments1);
double bending_stress_array1[b.no_of_load_var1];
b.bending_stress1(bending_stress_array1,moments1);
break;
}
case 3:
{
hollow c;
std::cout<<"\n\n\n\ You have chosen A Hollow Circular beam\n";
c.Dimensions2();
c.no_of_loads2();
c.location_magnitude2();
c.reactions2();
c.Inertia2();
double moments2[c.no_of_load_var2];
c.moments_finder2(moments2);
double bending_stress_array2[c.no_of_load_var2];
c.bending_stress2(bending_stress_array2,moments2);
break;
}
case 4:
{
holrec d;
std::cout<<"\n\n\n\ You have chosen A Hollow rectangualar beam\n";
d.Dimensions3();
d.no_of_loads3();
d.location_magnitude3();
d.reactions3();
d.Inertia3();
double moments3[d.no_of_load_var3];
d.moments_finder3(moments3);
double bending_stress_array3[d.no_of_load_var3];
d.bending_stress3(bending_stress_array3,moments3);
break;
}
default:
{
std::cout<<"\n\nSorry Wrong Input entered";
}
}
return 1;
}