محاسبه مساحت مستطیل
برنامه ای بنویسید که طول و عرض مستطیلی را از ورودی دریافت کند و مساحت آن را در خروجی چاپ کند
👨💻 0 ساعت قبل کاربر ناشناس این تمرین رو مشاهده کرد
برنامه ای بنویسید که طول و عرض مستطیلی را از ورودی دریافت کند و مساحت آن را در خروجی چاپ کند
#دریافت طول و عرض مستطیل
a = float(input("Tool Mostatil Ro Vared Kon:"))
b = float (input ("Arz Mostatil Ro VAred Kon:"))
#محاسبه
c = (a*b)
#چاپ خروجی
print(c)
fun main() {
println("Enter a value for width: ")
val width = readln().toInt()
println("Enter a value for length: ")
val length = readln().toInt()
val area = length * width
println(area)
}
B = float(input('number for arz vared kon :'))
C = float(input('number for toul vared kon :'))
resolut_shapeB = B * C
print(resolut_shapeB)
x = int(input('enter tool'))
y = int(input('enter arz'))
print(x * y)
Width=int(input("Enter Width:"))
Length=int(input("Enter Length"))
SurfaceArea=Width*Length
print("SurfaceArea:{}".format(SurfaceArea))
a = int (input(tool: )) s = int (input(arz: )) d = (a * s) print (d)
def area():
while True:
try:
length =int(input("please enter the length :"))
width = int(input("please enter the width :"))
if isinstance(length,int)and isinstance(width,int):
return f"area :{length*width}"
except Exception:
print("acces is not allowed")
print(area())
the_lenght_of_the_rectangle=int(input("enter number>>>>>>"))#طول مستطیل
the_width_of_the_rectangle=int(input("enter number>>>>>>"))#عرض مستطیل
area=the_lenght_of_the_rectangle*the_width_of_the_rectangle#مساحت
print(area)
arz=float(input("arz:"))
tol=float(input("tol:"))
mas=(tol*arz)
print(mas)
or
arz=float(input("arz:"))
tol=float(input("tol:"))
print(tol*arz)
X = float(input ("X: "))
Y = float(input ("Y: "))
Resul = X * Y
print(Resul,("XY"))
جوابت را با Markdown بنویس و ثبت کن
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نامتوضیح کوتاهی بنویسید تا تیم بررسی کند.