//Вот программа, которая кодирует слова в системах счисления от 2 до 10 //Первый ввод - число, второй - система счисления //Pascal ABC.NET v3.0
var a,i,b,r,n,j,bug:integer; s,se,slo,slof:string;
procedure preob(var a,b,n:integer; var se:string); begin repeat b:=a mod n; a:=a div n; str(b,se); s+=se; until (a<=n-1); end;
begin readln(slo); readln(n); for j:=1 to length(slo) do begin; a:=ord(slo[j]); preob(a,b,n,se); str(a,se); s+=se; for i:=1 to length(s) div 2 do begin; se:=s[i]; s[i]:=s[length(s)-i+1]; s[length(s)-i+1]:=se[1]; end; write(s,'-'); slof:=slof+s; delete(s,1,length(s)); end; end.
//Слово Программа она кодирует как 11001111-11110000-11101110-11100011-11110000-11100000-11101100-11101100-11100000-
Відповідь :
#include <iostream>
#include <windows.h>
#include <cmath>
using namespace std;
int main () {
SetConsoleCP(1251) ; SetConsoleOutputCP(1251) ;
double x,a,b,e,y , z , q ;
cout << "Первое число x" << endl ;
cin >> x;
cout << "2 число a" << endl ;
cin >> a;
cout << "3 число b" << endl ;
cin >> b;
cout << "4 число e" << endl ;
cin >> e;
cout << "5 число z" << endl ;
cin >> z;
cout << "6 число y:" << endl ;
cin >> y;
q = x + a*b / atan(z+y)*y-x ;
cout << q << endl ;
return 0 ;
}
Пояснення: Вроде так , по дополнительным вопросам обращайтесь .