bir güce bir sayı Raising İşte benim kodudur. Nedense BMI'm doğru hesaplanmamış. (10/((10/100)^2)))
Ben 1000 olsun, ama benim programda, ben yanlış yapıyorum emin değilim 5. olsun: Bunun için bir hesap makinesinde çıktı danışın. javaJava
import javax.swing.*;
public class BMI {
public static void main(String args[]) {
int height;
int weight;
String getweight;
getweight = JOptionPane.showInputDialog(null, "Please enter your weight in Kilograms");
String getheight;
getheight = JOptionPane.showInputDialog(null, "Please enter your height in Centimeters");
weight = Integer.parseInt(getweight);
height = Integer.parseInt(getheight);
double bmi;
bmi = (weight/((height/100)^2));
JOptionPane.showMessageDialog(null, "Your BMI is: " + bmi);
}
}
Bu Aradığınız operatör değil. – Malfist
@Malfist Sana bir Jedi –
@Malfist lol =) Gördüğüm – stytown