Home
О нас
Products
Services
Регистрация
Войти
Поиск
chertkovakristina
@chertkovakristina
July 2022
2
14
Report
Составить программу которая возводит в квадрат остаток от целочисленного деления числа а на 15 и выводит результат
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
Dany922
Program Program1;
var
A,B:Integer;
C,D:Real;
Begin
ReadLn(A);
B:=A mod 15;
C:=sqr(B);
WriteLn(C);
End.
1 votes
Thanks 0
hrenovoo
C и D - абсолютно лишние переменные, по большому счёту 1-й достаточно
Dany922
Согласен, можно сократить
hrenovoo
Var x:integer;
begin
readln(x);
writeln((x div 15)*(x div 15));
end.
1 votes
Thanks 0
hrenovoo
*не div, а mod
Dany922
Program Program2;
var
X:Integer;
begin
ReadLn(X);
WriteLn(sqr(X mod 15));
end.
Dany922
Хороший ответ)
hrenovoo
++
×
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
var
A,B:Integer;
C,D:Real;
Begin
ReadLn(A);
B:=A mod 15;
C:=sqr(B);
WriteLn(C);
End.
begin
readln(x);
writeln((x div 15)*(x div 15));
end.
var
X:Integer;
begin
ReadLn(X);
WriteLn(sqr(X mod 15));
end.