当前位置:网站首页>42.【vector简单列题】
42.【vector简单列题】
2022-07-30 06:29:00 【李在奋斗……】

#include <vector>
#include <iostream>
using namespace std;
int main()
{
vector<int> str_a(13);
for (int i = 0; i < 13; i++)
{
cout << "请输入第" << i + 1 << "个数为:" << endl;
cin >> str_a[i];
}
for (int j = 0; j < 13; j++)
{
if (str_a[j] == 3)
{
str_a.erase(str_a.begin() + j, str_a.begin() + j);
}
else
{
cout << str_a[j] << " ";
}
}
return 0;
}

边栏推荐
- MySql详解基础
- What new materials are used in the large aircraft C919?
- 从 Google 离职,前Go 语言负责人跳槽小公司
- C# uses RestSharp to implement Get, Post requests (2)
- IDEA search plug-in has no results and the solution has been spinning in circles
- Input method for programmers
- Electron使用romote报错 : Uncaught TypeError: Cannot read property ‘BrowserWindow‘ of undefined
- Common configuration
- interface
- 【雷达目标检测】恒定阈值法和恒虚警(CFAR)法及代码实现
猜你喜欢

golang : Zap log integration

selenium模块

五号黯区靶场 mysql 注入之limit注入记录

DNS domain name resolution services

IDEA search plug-in has no results and the solution has been spinning in circles

docker部署redis一主二从三哨兵模式

Go语学习笔记 - gorm使用 - 数据库配置、表新增 Web框架Gin(七)

SOFA Weekly|Meetup 广州站、本周 QA、本周 Contributor

「活动推荐」探索未来:数字科技

Electron之初出茅庐——搭建环境并运行第一个程序
随机推荐
sql concat()函数
DNS domain name resolution services
MySQL basics [naming convention]
linux安装mysql8参考指引
LeetCode:204. 计数质数
go : use gorm to modify data
MYSQL下载及安装完整教程
c语言变量的存储方式和生存期 -考察
go : delete database data using grom
Goto statements
云服务器零基础部署网站(保姆级教程)
Keil软件中map文件解析
动态规划专栏
入选“十大硬核科技”,详解可信密态计算(TECC)技术点
General Lei's personal blog to see
Develop common tool software
从 Google 离职,前Go 语言负责人跳槽小公司
Charles通过Rewrite越过OPTIONS请求拦截
RT-Thread-GD32的SPI在切换同一总线不同挂载设备时会出现切换后乱发送数据的问题
this and super