Var
N,A:integer;
Begin
Write('N = ');Read(N);
A:=0;
While N>0 do
if (N mod 10) > A then A:= N mod 10;
N:=N div 10;
End;
Write(A)
End.
N,A,B:integer;
C:boolean;
A:=-1;
B:=-2;
C:=false;
if A=B then C:=true;
if N>0 then
A:=N mod 10;
B:=N mod 10;
if C then Write('Есть')
else Write('Нет')
Подробнее - на -
Var
N,A:integer;
Begin
Write('N = ');Read(N);
A:=0;
While N>0 do
Begin
if (N mod 10) > A then A:= N mod 10;
N:=N div 10;
End;
Write(A)
End.
Var
N,A,B:integer;
C:boolean;
Begin
Write('N = ');Read(N);
A:=-1;
B:=-2;
C:=false;
While N>0 do
Begin
if A=B then C:=true;
if N>0 then
Begin
A:=N mod 10;
N:=N div 10;
End;
if A=B then C:=true;
if N>0 then
Begin
B:=N mod 10;
N:=N div 10;
End;
End;
if A=B then C:=true;
if C then Write('Есть')
else Write('Нет')
End.
Подробнее - на -
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <cstring>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <climits>typedef unsigned long long ulol;
typedef long double ld;
typedef long long lol;
typedef long int li;#define mp make_pair
#define F first
#define S second
#define sqr(a) ( (a) * (a) )
#define pb push_back
#define INF 999999999
#define ret(a) cout << endl; system("pause"); return(a)
//#define ret(a) return(a)using namespace std;int main()
{
ld x;
cin >> x;
x = ( 8 / sqrt( x ) ) + sqrt(x);
cout << x;
ret(0);
}