محاسبه مساحت مستطیل
برنامه ای بنویسید که طول و عرض مستطیلی را از ورودی دریافت کند و مساحت آن را در خروجی چاپ کند
👨💻 1 ساعت قبل کاربر ناشناس این تمرین رو مشاهده کرد
برنامه ای بنویسید که طول و عرض مستطیلی را از ورودی دریافت کند و مساحت آن را در خروجی چاپ کند
A = float(input("A: "))
B = float(input("B: "))
S = (A*B)
print( "S:" , S )
name = float (input("tool = "))
name2 = float (input("arz = "))
print("masahat" ,' =', name * name2)
#_The program for calculating the area of a rectangle
# ایجاد یک تابع
def rectangle() :
# گرفتن طول و عرض مستطیل از کاربر
length = int(input("Please Enter The The length of the rectangle :"))
width = int(input("Please Enter The width of the rectangle :"))
# انجام محاسبه مساحت مستطیل
plural = (length + width) * 2
# چاپ کردن مساحت مستطیل
print("area is :" , plural)
# فراخوانی تابع
rectangle()
tool=int(input('tool:')
arz=int(input('arz:')
d=tool*arz
print(a)
const countLength = prompt("Enter the rectangle's length:");
const countWidth = prompt("Enter the rectangle's width:");
const countArea = countLength * countWidth;
console.log(`Your rectangle's area is "${countArea}"`);
print("Enter the length and width of the rectangle:")
a = int(input("length"))
b = int(input("an offer"))
c = print(a * b)
a=input('arz mostatil: ')
a2=int(a)
b=input("tool mostatil: ")
b2=int(b)
print("masahat mostatil",a2*b2,'ast')
a=int(input(" Enter length ? "))
b=int(input(" Enter width ? "))
print(" Area = ",a*b)
#در این کد طول و عرض مستعطیل مورد نظر کاربر از کاربر گرفته میشود
width = int(input('enter width: '))
length = int(input('enter length: '))
#تو این کد عملیات انجام میشود و در خروجی چاپ میشود
square = length * width
print( square )
length=float(input("length: "))
width=float(input("Width: "))
S=length*width
print(S)
جوابت را با Markdown بنویس و ثبت کن
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نامتوضیح کوتاهی بنویسید تا تیم بررسی کند.