double Summ(double deposit, float rate, int day)
{
return deposit * rate * day / (365 * 100);
}
#include <locale>
#include <algorithm>
#include <cctype>
#include <sstream>
#include <iostream>
bool is_number(const std::string& s)
{
return !s.empty() && std::find_if(s.begin(),
s.end(), [](char c) { return !std::isdigit(c); }) == s.end();
}
int main()
{
std::string word = "", newString = "";
setlocale(LC_ALL, "rus");
std::string s = "12 34 учите С++";
std::stringstream x; //Создание потоковой переменной
x << s;
int i = 0;
while (x >> word)
{
if (i < 2)
{
if (is_number(word))
{
s.replace(0, word.length() + 1, "");
}
}
}
std::cout << s;
system("PAUSE");
return 0;
}
Если Вы уже зарегистрированы на Портале - войдите в систему, если Вы еще не регистрировались - пройдите простую процедуру регистрации.