C++ Дано тризначне число. Вивести число, отримане при прочитанні вихідного
числа справа наліво.
Ответы
#include <bits/stdc++.h>
#include <iostream>
#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#include <sstream>
#include <cassert>
#include <iomanip>
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <fstream>
#define all(x) x.begin(),x.end()
#define ll long long
#define pb push_back
#define Mp make_pair
#define ff first
#define ss second
#define vll vector<ll>
#define sll set<ll>
#define dnl nl << nl
#define reverse_flash ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
using namespace std;
const ll N = 1e6 + 1, inf = 2e9 + 7;
const ll LIM = 2e5;
const ll modd = 1e9 + 7;
const ll INF = 1e9 + 7;
const char nl = '\n';
string al = "abcdefghijklmnopqrstuvwxyz";
1
ll a[LIM + 13];
void sol() {
ll n;
cin >> n;
ll j = n % 10;
ll h = n / 10 % 10;
ll d = n / 100;
cout << j + h + d;
}
signed main(){
reverse_flash;
int tt = 1, cs = 1 ;
// cin >> tt ;
while (tt --){
// cout << "Case " << cs ++ << ": ";
sol();
}
}
вот код на языке с++