مساحت مربع
برنامه ای بنویسید که طول ضلع مربعی را از ورودی دریافت کند و مساحت آن را حساب کند
مساحت مربع = یک ضلع ضربدر خودش = یک ضلع یه توان 2
👨💻 1 ساعت قبل کاربر ناشناس این تمرین رو مشاهده کرد
برنامه ای بنویسید که طول ضلع مربعی را از ورودی دریافت کند و مساحت آن را حساب کند
مساحت مربع = یک ضلع ضربدر خودش = یک ضلع یه توان 2
# Calculating the area of a square
square_Side = input("Enter the side of the square. ")
try:
squareValue = int(square_Side)
except ValueError:
squareValue = float(square_Side)
formula = squareValue * squareValue
print("The area of the square is", formula, "square units.")
t=int(input('Tool Zele Morabae:'))
masahat=(t * t )
print(masahat)
a=int(input("اندازه یک ضلع:")
print('مساحت مربع:',a*a)
(morabba=int(input("Enter yor zer morabba:")
a=morabba**2
print(a)
print(int(input("your number:"))**2)
z=float(input(" :ضلع مربع"))
print(z*z)
input("khoroog")
package Tax.App;
import java.util.Scanner;
public class P_Squre {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
try {
System.out.print("Please Enter First Number: ");
int value1 = sc.nextInt();
System.out.print("Please Enter Second Number: ");
int value2 = sc.nextInt();
System.out.println();
System.out.printf(value1+" x "+value2+" = " +value1*value2);
}catch (Exception e) {
System.out.println();
System.out.println("please enter a valid number");
}
}
}
جوابت را با Markdown بنویس و ثبت کن
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نامتوضیح کوتاهی بنویسید تا تیم بررسی کند.