Strings

5.4 - Converting strings to integers


Strings can be converted into numbers using the std::stoi function. There are also std::stol and std::stoll for converting strings to long and long long respectively. For unsigned integers there are std::stoul and std::stoull for unsigned long and unsigned long long.

Task

Your task is to create a program which receives a string formatted <x><operator><y>, where x and y are three digit numbers and operator can be +, -, *, or / and outputs the result of the operation.

Sample input

009+016

Sample output

25
#include <iostream> #include <string> int main() { }