Tabular.datastructure.assignment (1)
Tabular.datastructure.assignment (1)
#
include
<
bits/stdc++.h
>
using
namespace
std
;
int
main
(){
map
<
string
,
int
>
test
={
{
"
Blood Test
"
,
120
},{
"
MRI scan
"
,
800
},{
"
X-ray
"
,
100
},{
"
Ultra
sound
"
,
1
50
},{
"
ECG
"
,
200
},{
"
CT Scan
"
,
700
},{
"
Covid 19Test
"
,
50
},{
"
Urine
analysis
"
,
80
},
{
"
A
llery test
"
,
300
},{
"
Biospy
"
,
900
}};
for
(
a
uto
it
:
test
){
cout
<<
it
.
first
<<
"
"<<
it
.
second
<<
"
\n
"
;
}
return
0;
}
.
2
#
i
nclude<
bits/stdc++.h >
using
namespace std ;
int
main(){
vector
<
string
>
Medicinetype
={
"
Antibiotic
"
,
"
Pinkiller
"
,
"
Antacid
"
,
"
Antihistamine "
,
"
antidepressant
"
,
"
Antiviral "
,
"
Anti-Inflamattory
"
,
"
Vaccine "
,
"
Insulin
"
,
"
Sedative
"
};
vector
<
int
>
Averagedose
={
500
,
250
,
150
,
100
,
300
,
400
,
200
,
5
,
40
,
50
};
vector
<
pair
<
string
,
int
>>
Medication
;
for
(
size_t
i=
0
;
i
<
Averagedose
.
size
();
i
++){
Medication
.
push_back
(
{
Medicinetype
[
i
],
Averagedose
[
i
]
}
);
}
for
(
auto
it
:
Medication
){
cout
<<
it
.
first
<<
"
"
<<
it
.
second
<<
"
\n
"
;
}
}
3.
#
include
<
bits/stdc++.h
>
using
namespace
std
;
int
main
(){
vector
<
string
>
Vehicletype
={
"
Sedan
"
,
"
Suv
"
,
"
Hatchback
"
,
"
MiniSUV
"
,
"
MicroSUV
"
,
"
Crossover
"
,
"
convertible
"
,
"
Electriccar
"
,
"
Hybridcar
"
,
"
coupe
"
};
vector
<
int
>
AverageMileage
={
15
,
12
,
18
,
8
,
40
,
120
,
2
5
,
14
,
16
,
13
};
map
<
string
,
int
>
Rating
;
for
(
size_t
i=
0
;
i
<
Vehicletype
.
size
();
i
++){
Rating
[
Vehicletype
[
i
]]=
AverageMileage
[
i
];
}
for
(
auto
it
:
Rating
){
cout
<<
it
.
first
<<
"
"
<<
it
.
second
<<
"
\n
"
;
}
}
.
4
#
i
nclude<
bits/stdc++.h >
using
namespace std ;
int
main(){
vector
<
string
>
coursetype
={
"
B.tech "
,
"
M.tech
"
,
"
Diploma "
,
"
Certification "
,
"
Online course
"
,
"
Phd program
"
,
"
Bootcamp
"
,
"
associate degree "
,
"
internship"
,
"
workshop
"
};
vector
<
int
>
AverageDurationMonths
={
48
,
24
,
12
,
6
,
3
,
60
,
4
,
24,
2
,
1
};
for
(
int
i
=
0
;
i
<
coursetype
.
size
();
i
++){
cout
<<
coursetype
[
i
]<<
"
"<<
AverageDurationMonths
[
i
]<<
"
\n
"
;
}
}
.
5
#
i
nclude<
bits/stdc++.h >
using
namespace std ;
int
main(){
vector
<
string
>
investmenttype
={
"
Stocks
"
,
"
bonds
"
,
"
realestate
"
,
"
Mutualfunds "
,
"
gold
"
,
"
cryptocurrency
"
,
"
Fixeddeposit
"
,
"
Savings account
"
,
"
ETF's
"
,
"
commodities
"
};
vector
<
int
>
AverageDurationMonths
={
10
,
5
,
8
,
7
,
6
,
15
,
4
,
2
,
9
,
6
};
for
(
int
i
=
0
;
i
<
investmenttype
.
size
();
i
++){
cout
<<
investmenttype
[
i
]<<
"
"<<
AverageDurationMonths
[
i
]<<
"
\n
"
;
}
}