Код: Выделить всё
public class Ex1 {
Scanner input = new Scanner(System.in);
float size;
float new_size;
public void Converter(){
System.out.println("مقدار پارچه را به مترمربع وارد کنید :");
size = input.nextInt();
new_size = size * 1.196f;
}
public void Print(){
System.out.println(new_size);
}
}
class Main{
public static void main(String[] args) {
Ex1 first = new Ex1();
first.Converter();
first.Print();
}
}
Подробнее здесь: https://stackoverflow.com/questions/786 ... tudio-code