/*******************************************
功能: 输入整数,并且按第一个+最后一个,第二个+倒数第二个..
的顺序相加,并输出结果。
作者: gnehaoix
时间: 2019\4\18
********************************************/
#include "stdafx.h"
#include<iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
vector<int> s;
int number;
int sum;
while (cin >> number)
{
s.push_back(number);
}
/*区分奇偶数*/
if (s.size() % 2 == 0)
{
for (string::size_type i = 0; i
首尾数相加.cpp
最新推荐文章于 2021-02-01 14:08:16 发布