Ma’lumotlar tuzilmasi va algoritmi
F.I.SH. Yusupov Boburbek__________________________________
Guruh: ___913 21_______________________________________
Amaliyot: __5_________
Misol: __27__________
Dasturlash tili: ___C++____________________________
27. Vector ustida quydagi funktsiyalar yordamida dastur tuzing:
Size(), empty(),max_size();
#include
#include
#include
using namespace std;
vector v;
int vec(){
if(!v.empty()) {
cout<cout<else {
cout<<"Bo'sh";}
}
int main(){
v.push_back(1);
v.push_back(2);
vec();
return 0;}
Do'stlaringiz bilan baham: |