Untitled

 avatar
user_7248805
plain_text
2 years ago
633 B
1
Indexable
Never
#include <iostream>
#include <cmath>
 
using namespace std;
 
char int_symbol(int in){
    char out[]={'0','1','2','3','4','5','6','7','8','9',
    'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P',
    'Q','R','S','T','U','V','W','X','Y','Z'};
    return out[in];
}

int main()
{
    setlocale(LC_ALL,"RUS");
    int N,a2,a;
    cout<<"перевести: ";
    cin>>N;
    cout<<"из ";
    cin>>a;
    cout<<"в ";
    cin>>a2;
    cout<<"Конечное число : ";
    int result=0;
    int cnt=0;
    while (N>0)
    {
        result+=N%10*pow(a,cnt++);
        N/=10;
    }
}