Var unitsCount, tensCount, hundredsCount, number : integer; begin readln(number); unitsCount := number mod 10; tensCount := (number div 10) mod 10; hundredsCount := number div 100; writeln('Count of units: ', unitsCount); writeln('Count of tens: ', tensCount); writeln('Count of hundreds: ', hundredsCount); writeln('Sum of digits: ', unitsCount + tensCount + hundredsCount); writeln('Multiplication of digits: ', unitsCount * tensCount * hundredsCount); end.
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota
Оформи подписку