М
Молодежь
К
Компьютеры-и-электроника
Д
Дом-и-сад
С
Стиль-и-уход-за-собой
П
Праздники-и-традиции
Т
Транспорт
П
Путешествия
С
Семейная-жизнь
Ф
Философия-и-религия
Б
Без категории
М
Мир-работы
Х
Хобби-и-рукоделие
И
Искусство-и-развлечения
В
Взаимоотношения
З
Здоровье
К
Кулинария-и-гостеприимство
Ф
Финансы-и-бизнес
П
Питомцы-и-животные
О
Образование
О
Образование-и-коммуникации
alinaastana2015
alinaastana2015
25.08.2021 04:26 •  Информатика

История письменности формальными и естественными языками.

сообщение на 1 лист а

👇
Открыть все ответы
Ответ:
madina319
madina319
25.08.2021
1)
Var
n,m,max,min:integer;
Begin
write('Введите число: ');
readln(n);
min:=9;   
max:=0;
while n>0 do 
begin 
m:=n mod 10; 
if m<min then min:=m; 
if m>max then max:=m; 
n:=n div 10; end;   
writeln('Максимальное число: ',max);   
writeln('Минимальное число: ',min);
End.
2)
var
i,count: integer;
n,s:string;
begin
writeln('Введите число: ');
readln(s);
writeln('Введите цифру: ');
readln(n);
for i:=1 to length(s) do
if(s[i]=n)then
count:=count+1;
writeln('Количество раз, когда встречается цифра = ',count);
end.
4,6(27 оценок)
Ответ:

 import java.util.Scanner;

 

class Main {  

public static void main(String[] args)

{

 Scanner input = new Scanner (System.in);

 

       System.out.println ("Let's play the lottery!");

       System.out.println ("Enter an integer from 0 to 100");

       boolean won = false;

       int x = 0;

       x = input.nextInt ();

       

       if (x > 100)

       

       {

        System.out.println ("You entered a number outside the specified limits!");

        System.out.println ("Enter a new number");

         x = input.nextInt ();

       

        }

       

       

       if (x < 0)

       

       {

        System.out.println ("You entered a number outside the specified limits!");

        System.out.println ("Enter a new number");

        x = input.nextInt ();

       

        }

       

       if (x == 10)

       

       {

        System.out.println ("You are lucky. You won 100$");

        won = true;

        }

       if (x == 50)

       

       {

        System.out.println ("Luck is always with you. You won 10$");

        won = true;

        }

       if (x == 99)

       

       {

        System.out.println ("Good job. You won 50$");

        won = true;

        }

       

       if (x == 1)

       

       {

        System.out.println ("The winning is 20$");

        won = true;

        }

       if (!won)

       {

        System.out.println("You are not lucky. Try next time");

       }

       System.out.println ("End!");

 

}

}

Объяснение:

4,5(40 оценок)
Это интересно:
Новые ответы от MOGZ: Информатика
logo
Вход Регистрация
Что ты хочешь узнать?
Спроси Mozg
Открыть лучший ответ