Home
О нас
Products
Services
Регистрация
Войти
Поиск
katyakep2016
@katyakep2016
July 2022
1
15
Report
Решите плииииз................
Please enter comments
Please enter your name.
Please enter the correct email address.
Agree to
terms of service
You must agree before submitting.
Send
Answers & Comments
Aillianna
Verified answer
# # Код на ruby 2.2.3p173
number = 0
File.open("input.txt", "r") do |infile|
while (line = infile.gets)
number = line.to_i
break
end
p number
end
number = number.abs
last_n = number % 10
while number >= 10 do
number = number / 10
end
p [number, last_n]
File.open("output.txt", "w") do |file|
if last_n == number
file.puts "="
elsif number > last_n
file.puts ">"
else
file.puts "<"
end
end
0 votes
Thanks 0
More Questions From This User
See All
katyakep2016
August 2022 | 0 Ответы
Какие клетки изображены на рисунке?...
Answer
katyakep2016
July 2022 | 0 Ответы
Реагирует ли CO2 с KOH?И как?...
Answer
katyakep2016
July 2022 | 0 Ответы
Какие клетки изображены?...
Answer
рекомендуемые вопросы
rarrrrrrrr
August 2022 | 0 Ответы
о чем должны позаботиться в первую очередь взрослые при организационном вывозе н...
danilarsentev
August 2022 | 0 Ответы
Есть два станка на которых выпускают одинаковые запчасти один производит a запча...
myachina8
August 2022 | 0 Ответы
Найти по графику отношение V3:V1. В ответах написано 9, но нужно решение...
ydpmn7cn6w
August 2022 | 0 Ответы
Choose the correct preposition: 1.I am fond (out,of,from) literature. 2.where ar...
millermilena658
August 2022 | 0 Ответы
Определите Как создавалась и кто создавал арабское государство в крации...
MrZooM222
August 2022 | 0 Ответы
Ч. Айтманов в рассказе "Красное яблоко" использует метод рассказ в рассказе. Опи...
timobila47
August 2022 | 0 Ответы
каково было назначение каждой из частей византийского храма? помогите пожалуйста...
ivanyyaremkiv
August 2022 | 0 Ответы
moment. 6....
Участник Знаний
August 2022 | 0 Ответы
Пожалуйста!!!!!!!!!!!!...
sarvinozwakirjanova
August 2022 | 0 Ответы
помогите пожалусто пж...
×
Report "Решите плииииз..."
Your name
Email
Reason
-Select Reason-
Pornographic
Defamatory
Illegal/Unlawful
Spam
Other Terms Of Service Violation
File a copyright complaint
Description
Helpful Links
О нас
Политика конфиденциальности
Правила и условия
Copyright
Контакты
Helpful Social
Get monthly updates
Submit
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
# # Код на ruby 2.2.3p173number = 0
File.open("input.txt", "r") do |infile|
while (line = infile.gets)
number = line.to_i
break
end
p number
end
number = number.abs
last_n = number % 10
while number >= 10 do
number = number / 10
end
p [number, last_n]
File.open("output.txt", "w") do |file|
if last_n == number
file.puts "="
elsif number > last_n
file.puts ">"
else
file.puts "<"
end
end