محاسبه مساحت مستطیل
برنامه ای بنویسید که طول و عرض مستطیلی را از ورودی دریافت کند و مساحت آن را در خروجی چاپ کند
👨💻 1 ساعت قبل کاربر ناشناس این تمرین رو مشاهده کرد
برنامه ای بنویسید که طول و عرض مستطیلی را از ورودی دریافت کند و مساحت آن را در خروجی چاپ کند
#محاسبه مساحت مستطیل
#دریافت طول و عرض مستطیل
length = float(input("Enter Rectanghe length : "))
Width = float(input("Enter Rectangle width : "))
#فرمول محسابه مساحت مستطیل
area = Width * length
#چاپ مساحت مستطیل
print("Your Rectangle Area :" , area)
length=int(input('put the length:'))
width=int(input('put the width:'))
print(width*length)
# Get user input for length and width
a = int(input("Please enter the length: ")) # Convert input to integer
b = int(input("Please enter the width: ")) # Convert input to integer
# Calculate and print the area
Surface = (a * b)
print("Surface:" , Surface )
length=float(input("Enter length:"))
width=float(input("Enter width:"))
print(f"Area={length*width}")
a=int(input('Enter the length of the rectangle?\t'))
b=int(input('Enter the width of the rectangle?\t'))
masahat= ((a)*(b))
print(masahat)
let height = prompt("Tool: ")
let width = prompt("Arz: ")
const Area = height * width
console.log("Masahat: " + Area)
# دستگاه محاسبه مساحت مستطیل
def zarb(TOOL,ARZ):
return (TOOL*ARZ)
TOOL = float((input("TOOL:")))
ARZ = float((input("ARZ:")))
if zarb(TOOL, ARZ) <= (0):
print("Error!")
else:
print("S = ", (zarb(TOOL,ARZ)))
width = float(input("Rectangle Width: "))
length = float(input("Rectangle Length : "))
print("Area of Rectangle:", width * length)
def masa():
tool = int(input("enter your tool:"))
arz = int(input("enter yoru arz"))
masahat = tool * arz
print(f"masahat mostatil: {masahat}")
masa()
Lenght = float(input("Enter your Rectangle Length? "))
Width = float(input("Enter your Rectangle Width? "))
print("Your Rectangle Area =", Lenght * Width)
جوابت را با Markdown بنویس و ثبت کن
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نامتوضیح کوتاهی بنویسید تا تیم بررسی کند.