import java.util.Calendar;
import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.util.Log;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
public class hitunggizi extends Activity {
String id,nama,ortu,tgllahir,jk,ket, Hasilnya, Sarannya;
Button btnHitung;
EditText txtNama,txtOrtu, txtJK, txtTglLahir, txtUsia, txtTglTimbang, txtBB, txtTB;//txtHasil, txtSaran; //;
dbHelperTimbang helper=null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.hitunggizi);
helper=new dbHelperTimbang(this);
Intent i = this.getIntent();
id=i.getStringExtra("id");
nama=i.getStringExtra("nama");
ortu=i.getStringExtra("ortu");
tgllahir=i.getStringExtra("tgllahir");
jk=i.getStringExtra("jk");
ket=i.getStringExtra("ket");
Calendar cal = Calendar.getInstance();
int tgl= cal.get(Calendar.DATE);
int bln= cal.get(Calendar.MONTH)+1;
int thn= cal.get(Calendar.YEAR);
String stgl=String.valueOf(thn)+"-"+String.valueOf(bln)+"-"+String.valueOf(tgl);
String []art=tgllahir.split("-");
int tgl1=Integer.parseInt(art[2]);
int bln1=Integer.parseInt(art[1]);
int thn1=Integer.parseInt(art[0]);
int selthn=(thn-thn1)*12;
int selbln=bln-bln1;
int ubln=selthn+selbln;
String subln=String.valueOf(ubln);
txtNama= (EditText) findViewById(R.id.hgnama);txtNama.setEnabled(false);txtNama.setText(nama);
txtOrtu= (EditText) findViewById(R.id.hgortu);txtOrtu.setEnabled(false);txtOrtu.setText(ortu);
txtTglLahir= (EditText) findViewById(R.id.hgtgllahir);txtTglLahir.setEnabled(false);txtTglLahir.setText(tgllahir);
txtUsia= (EditText) findViewById(R.id.hgusia);txtUsia.setEnabled(false);
txtUsia.setText(subln);
txtJK= (EditText) findViewById(R.id.hgjk);txtJK.setEnabled(false);txtJK.setText(jk);
txtTglTimbang= (EditText) findViewById(R.id.hgtgltimbang);txtTglTimbang.setText(stgl);
txtBB= (EditText) findViewById(R.id.hgberatbadan);txtBB.setText("");
txtTB= (EditText) findViewById(R.id.hgtinggibadan);txtTB.setText("");
btnHitung= (Button) findViewById(R.id.hgHitung);
btnHitung.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String tb=txtTB.getText().toString();
String bb=txtBB.getText().toString();
if(tb.length()<1){pesan("Lengkapi data Tinggi Badan Anak Anda");}
else if(bb.length()<1){pesan("Lengkapi data Berat Badan Anak Anda");}
else{
String u=txtUsia.getText().toString().trim();
String hasil="";
String hasil2="";
double t=Double.parseDouble(tb);
double b=Double.parseDouble(bb);
//==================================
int umur=Integer.parseInt(u);
if(jk.equalsIgnoreCase("Laki-laki")){
if(umur==0){
if(b<2.1){hasil="Gizi Buruk";}
else if(b>=2.1 && b <2.5){hasil="Gizi Kurang";}
else if(b>=2.5 && b <=4.4){hasil="Gizi Baik";}
else if(b>4.4){hasil="Gizi Lebih";}
}
else if(umur==1){
if(b<2.9){hasil="Gizi Buruk";}
else if(b>=2.9 && b <3.4){hasil="Gizi Kurang";}
else if(b>=3.4 && b <=5.8){hasil="Gizi Baik";}
else if(b>5.8){hasil="Gizi Lebih";}
}
else if(umur==2){
if(b<3.8){hasil="Gizi Buruk";}
else if(b>=3.8 && b <4.3){hasil="Gizi Kurang";}
else if(b>=4.3 && b <=7.1){hasil="Gizi Baik";}
else if(b>7.1){hasil="Gizi Lebih";}
}
else if(umur==3){
if(b<4.4){hasil="Gizi Buruk";}
else if(b>=4.4 && b <5.0){hasil="Gizi Kurang";}
else if(b>=5.0 && b <=8.0){hasil="Gizi Baik";}
else if(b>8.0){hasil="Gizi Lebih";}
}
else if(umur==4){
if(b<4.9){hasil="Gizi Buruk";}
else if(b>=4.9 && b <5.6){hasil="Gizi Kurang";}
else if(b>=5.6 && b <=8.7){hasil="Gizi Baik";}
else if(b>8.7){hasil="Gizi Lebih";}
}
else if(umur==5){
if(b<5.3){hasil="Gizi Buruk";}
else if(b>=5.3 && b <6.0){hasil="Gizi Kurang";}
else if(b>=6.0 && b <=9.3){hasil="Gizi Baik";}
else if(b>9.3){hasil="Gizi Lebih";}
}
else if(umur==6){
if(b<5.7){hasil="Gizi Buruk";}
else if(b>=5.7 && b <6.4){hasil="Gizi Kurang";}
else if(b>=6.4 && b <=9.8){hasil="Gizi Baik";}
else if(b>9.8){hasil="Gizi Lebih";}
}
else if(umur==7){
if(b<5.9){hasil="Gizi Buruk";}
else if(b>=5.9 && b <6.7){hasil="Gizi Kurang";}
else if(b>=6.7 && b <=10.3){hasil="Gizi Baik";}
else if(b>10.3){hasil="Gizi Lebih";}
}
else if(umur==8){
if(b<6.2){hasil="Gizi Buruk";}
else if(b>=6.2 && b <6.9){hasil="Gizi Kurang";}
else if(b>=6.9 && b <=10.7){hasil="Gizi Baik";}
else if(b>10.7){hasil="Gizi Lebih";}
}
else if(umur==9){
if(b<6.4){hasil="Gizi Buruk";}
else if(b>=6.4 && b <7.1){hasil="Gizi Kurang";}
else if(b>=7.1 && b <=11.0){hasil="Gizi Baik";}
else if(b>11.0){hasil="Gizi Lebih";}
}
else if(umur==10){
if(b<6.6){hasil="Gizi Buruk";}
else if(b>=6.6 && b <7.4){hasil="Gizi Kurang";}
else if(b>=7.4 && b <=11.4){hasil="Gizi Baik";}
else if(b>11.4){hasil="Gizi Lebih";}
}
else if(umur==11){
if(b<6.8){hasil="Gizi Buruk";}
else if(b>=6.8 && b <7.6){hasil="Gizi Kurang";}
else if(b>=7.6 && b <=11.7){hasil="Gizi Baik";}
else if(b>11.7){hasil="Gizi Lebih";}
}
else if(umur==12){
if(b<6.9){hasil="Gizi Buruk";}
else if(b>=6.9 && b <7.7){hasil="Gizi Kurang";}
else if(b>=7.7 && b <=12.0){hasil="Gizi Baik";}
else if(b>12.0){hasil="Gizi Lebih";}
}
else if(umur==13){
if(b<7.1){hasil="Gizi Buruk";}
else if(b>=7.1 && b <7.9){hasil="Gizi Kurang";}
else if(b>=7.9 && b <=12.3){hasil="Gizi Baik";}
else if(b>12.3){hasil="Gizi Lebih";}
}
else if(umur==14){
if(b<7.2){hasil="Gizi Buruk";}
else if(b>=7.2 && b <8.1){hasil="Gizi Kurang";}
else if(b>=8.1 && b <=12.6){hasil="Gizi Baik";}
else if(b>12.6){hasil="Gizi Lebih";}
}
else if(umur==15){
if(b<7.4){hasil="Gizi Buruk";}
else if(b>=7.4 && b <8.3){hasil="Gizi Kurang";}
else if(b>=8.3 && b <=12.8){hasil="Gizi Baik";}
else if(b>12.8){hasil="Gizi Lebih";}
}
else if(umur==16){
if(b<7.5){hasil="Gizi Buruk";}
else if(b>=7.5 && b <8.4){hasil="Gizi Kurang";}
else if(b>=8.4 && b <=13.1){hasil="Gizi Baik";}
else if(b>13.1){hasil="Gizi Lebih";}
}
else if(umur==17){
if(b<7.7){hasil="Gizi Buruk";}
else if(b>=7.7 && b <8.6){hasil="Gizi Kurang";}
else if(b>=8.6 && b <=13.4){hasil="Gizi Baik";}
else if(b>13.4){hasil="Gizi Lebih";}
}
else if(umur==18){
if(b<7.8){hasil="Gizi Buruk";}
else if(b>=7.8 && b <8.8){hasil="Gizi Kurang";}
else if(b>=8.8 && b <=13.7){hasil="Gizi Baik";}
else if(b>13.7){hasil="Gizi Lebih";}
}
else if(umur==19){
if(b<8.0){hasil="Gizi Buruk";}
else if(b>=8.0 && b <8.9){hasil="Gizi Kurang";}
else if(b>=8.9 && b <=13.9){hasil="Gizi Baik";}
else if(b>13.9){hasil="Gizi Lebih";}
}
else if(umur==20){
if(b<8.1){hasil="Gizi Buruk";}
else if(b>=8.1 && b <9.1){hasil="Gizi Kurang";}
else if(b>=9.1 && b <=14.2){hasil="Gizi Baik";}
else if(b>14.2){hasil="Gizi Lebih";}
}
else if(umur==21){
if(b<8.2){hasil="Gizi Buruk";}
else if(b>=8.2 && b <9.2){hasil="Gizi Kurang";}
else if(b>=9.2 && b <=14.5){hasil="Gizi Baik";}
else if(b>14.5){hasil="Gizi Lebih";}
}
else if(umur==22){
if(b<8.4){hasil="Gizi Buruk";}
else if(b>=8.4 && b <9.4){hasil="Gizi Kurang";}
else if(b>=9.4 && b <=14.7){hasil="Gizi Baik";}
else if(b>14.7){hasil="Gizi Lebih";}
}
else if(umur==23){
if(b<8.5){hasil="Gizi Buruk";}
else if(b>=8.5 && b <9.5){hasil="Gizi Kurang";}
else if(b>=9.5 && b <=15.0){hasil="Gizi Baik";}
else if(b>15.0){hasil="Gizi Lebih";}
}
else if(umur==24){
if(b<8.6){hasil="Gizi Buruk";}
else if(b>=8.6 && b <9.7){hasil="Gizi Kurang";}
else if(b>=9.7 && b <=15.3){hasil="Gizi Baik";}
else if(b>15.3){hasil="Gizi Lebih";}
}
else if(umur==25){
if(b<8.8){hasil="Gizi Buruk";}
else if(b>=8.8 && b <9.8){hasil="Gizi Kurang";}
else if(b>=9.8 && b <=15.5){hasil="Gizi Baik";}
else if(b>15.5){hasil="Gizi Lebih";}
}
else if(umur==26){
if(b<8.9){hasil="Gizi Buruk";}
else if(b>=8.9 && b <10.0){hasil="Gizi Kurang";}
else if(b>=10.0 && b <=15.8){hasil="Gizi Baik";}
else if(b>15.8){hasil="Gizi Lebih";}
}
else if(umur==27){
if(b<9.0){hasil="Gizi Buruk";}
else if(b>=9.0 && b <10.1){hasil="Gizi Kurang";}
else if(b>=10.1 && b <=16.1){hasil="Gizi Baik";}
else if(b>16.1){hasil="Gizi Lebih";}
}
else if(umur==28){
if(b<9.1){hasil="Gizi Buruk";}
else if(b>=9.1 && b <10.2){hasil="Gizi Kurang";}
else if(b>=10.2 && b <=16.3){hasil="Gizi Baik";}
else if(b>16.3){hasil="Gizi Lebih";}
}
else if(umur==29){
if(b<9.2){hasil="Gizi Buruk";}
else if(b>=9.2 && b <10.4){hasil="Gizi Kurang";}
else if(b>=10.4 && b <=16.6){hasil="Gizi Baik";}
else if(b>16.6){hasil="Gizi Lebih";}
}
else if(umur==30){
if(b<9.4){hasil="Gizi Buruk";}
else if(b>=9.4 && b <10.5){hasil="Gizi Kurang";}
else if(b>=10.5 && b <=16.9){hasil="Gizi Baik";}
else if(b>16.9){hasil="Gizi Lebih";}
}
else if(umur==31){
if(b<9.5){hasil="Gizi Buruk";}
else if(b>=9.5 && b <10.7){hasil="Gizi Kurang";}
else if(b>=10.7 && b <=17.1){hasil="Gizi Baik";}
else if(b>17.1){hasil="Gizi Lebih";}
}
else if(umur==32){
if(b<9.6){hasil="Gizi Buruk";}
else if(b>=9.6 && b <10.8){hasil="Gizi Kurang";}
else if(b>=10.8 && b <=17.4){hasil="Gizi Baik";}
else if(b>17.4){hasil="Gizi Lebih";}
}
else if(umur==33){
if(b<9.7){hasil="Gizi Buruk";}
else if(b>=9.7 && b <10.9){hasil="Gizi Kurang";}
else if(b>=10.9 && b <=17.6){hasil="Gizi Baik";}
else if(b>17.6){hasil="Gizi Lebih";}
}
else if(umur==34){
if(b<9.8){hasil="Gizi Buruk";}
else if(b>=9.8 && b <11.0){hasil="Gizi Kurang";}
else if(b>=11.0 && b <=17.8){hasil="Gizi Baik";}
else if(b>17.8){hasil="Gizi Lebih";}
}
else if(umur==35){
if(b<9.9){hasil="Gizi Buruk";}
else if(b>=9.9 && b <11.2){hasil="Gizi Kurang";}
else if(b>=11.2 && b <=18.1){hasil="Gizi Baik";}
else if(b>18.1){hasil="Gizi Lebih";}
}
else if(umur==36){
if(b<10.0){hasil="Gizi Buruk";}
else if(b>=10.0 && b <11.3){hasil="Gizi Kurang";}
else if(b>=11.3 && b <=18.3){hasil="Gizi Baik";}
else if(b>18.3){hasil="Gizi Lebih";}
}
else if(umur==37){
if(b<10.1){hasil="Gizi Buruk";}
else if(b>=10.1 && b <11.4){hasil="Gizi Kurang";}
else if(b>=11.4 && b <=18.6){hasil="Gizi Baik";}
else if(b>18.6){hasil="Gizi Lebih";}
}
else if(umur==38){
if(b<10.2){hasil="Gizi Buruk";}
else if(b>=10.2 && b <11.5){hasil="Gizi Kurang";}
else if(b>=11.5 && b <=18.8){hasil="Gizi Baik";}
else if(b>18.8){hasil="Gizi Lebih";}
}
else if(umur==39){
if(b<10.3){hasil="Gizi Buruk";}
else if(b>=10.3 && b <11.6){hasil="Gizi Kurang";}
else if(b>=11.6 && b <=19.0){hasil="Gizi Baik";}
else if(b>19.0){hasil="Gizi Lebih";}
}
else if(umur==40){
if(b<10.4){hasil="Gizi Buruk";}
else if(b>=10.4 && b <11.8){hasil="Gizi Kurang";}
else if(b>=11.8 && b <=19.3){hasil="Gizi Baik";}
else if(b>19.3){hasil="Gizi Lebih";}
}
else if(umur==41){
if(b<10.5){hasil="Gizi Buruk";}
else if(b>=10.5 && b <11.9){hasil="Gizi Kurang";}
else if(b>=11.9 && b <=19.5){hasil="Gizi Baik";}
else if(b>19.5){hasil="Gizi Lebih";}
}
else if(umur==42){
if(b<10.6){hasil="Gizi Buruk";}
else if(b>=10.6 && b <12.0){hasil="Gizi Kurang";}
else if(b>=12.0 && b <=19.7){hasil="Gizi Baik";}
else if(b>19.7){hasil="Gizi Lebih";}
}
else if(umur==43){
if(b<10.7){hasil="Gizi Buruk";}
else if(b>=10.7 && b <12.1){hasil="Gizi Kurang";}
else if(b>=12.1 && b <=20.0){hasil="Gizi Baik";}
else if(b>20.0){hasil="Gizi Lebih";}
}
else if(umur==44){
if(b<10.8){hasil="Gizi Buruk";}
else if(b>=10.8 && b <12.2){hasil="Gizi Kurang";}
else if(b>=12.2 && b <=20.2){hasil="Gizi Baik";}
else if(b>20.2){hasil="Gizi Lebih";}
}
else if(umur==45){
if(b<10.9){hasil="Gizi Buruk";}
else if(b>=10.9 && b <12.4){hasil="Gizi Kurang";}
else if(b>=12.4 && b <=20.5){hasil="Gizi Baik";}
else if(b>20.5){hasil="Gizi Lebih";}
}
else if(umur==46){
if(b<11.0){hasil="Gizi Buruk";}
else if(b>=11.0 && b <12.5){hasil="Gizi Kurang";}
else if(b>=12.5 && b <=20.7){hasil="Gizi Baik";}
else if(b>20.7){hasil="Gizi Lebih";}
}
else if(umur==47){
if(b<11.1){hasil="Gizi Buruk";}
else if(b>=11.1 && b <12.6){hasil="Gizi Kurang";}
else if(b>=12.6 && b <=20.9){hasil="Gizi Baik";}
else if(b>20.9){hasil="Gizi Lebih";}
}
else if(umur==48){
if(b<11.2){hasil="Gizi Buruk";}
else if(b>=11.2 && b <12.7){hasil="Gizi Kurang";}
else if(b>=12.7 && b <=21.2){hasil="Gizi Baik";}
else if(b>21.2){hasil="Gizi Lebih";}
}
else if(umur==49){
if(b<11.3){hasil="Gizi Buruk";}
else if(b>=11.3 && b <12.8){hasil="Gizi Kurang";}
else if(b>=12.8 && b <=21.4){hasil="Gizi Baik";}
else if(b>21.4){hasil="Gizi Lebih";}
}
else if(umur==50){
if(b<11.4){hasil="Gizi Buruk";}
else if(b>=11.4 && b <12.9){hasil="Gizi Kurang";}
else if(b>=12.9 && b <=21.7){hasil="Gizi Baik";}
else if(b>21.7){hasil="Gizi Lebih";}
}
else if(umur==51){
if(b<11.5){hasil="Gizi Buruk";}
else if(b>=11.5 && b <13.1){hasil="Gizi Kurang";}
else if(b>=13.1 && b <=21.9){hasil="Gizi Baik";}
else if(b>21.9){hasil="Gizi Lebih";}
}
else if(umur==52){
if(b<11.6){hasil="Gizi Buruk";}
else if(b>=11.6 && b <13.2){hasil="Gizi Kurang";}
else if(b>=13.2 && b <=22.2){hasil="Gizi Baik";}
else if(b>22.2){hasil="Gizi Lebih";}
}
else if(umur==53){
if(b<11.7){hasil="Gizi Buruk";}
else if(b>=11.7 && b <13.3){hasil="Gizi Kurang";}
else if(b>=13.3 && b <=22.4){hasil="Gizi Baik";}
else if(b>22.4){hasil="Gizi Lebih";}
}
else if(umur==54){
if(b<11.8){hasil="Gizi Buruk";}
else if(b>=11.8 && b <13.4){hasil="Gizi Kurang";}
else if(b>=13.4 && b <=22.7){hasil="Gizi Baik";}
else if(b>22.7){hasil="Gizi Lebih";}
}
else if(umur==55){
if(b<11.9){hasil="Gizi Buruk";}
else if(b>=11.9 && b <13.5){hasil="Gizi Kurang";}
else if(b>=13.5 && b <=22.9){hasil="Gizi Baik";}
else if(b>22.9){hasil="Gizi Lebih";}
}
else if(umur==56){
if(b<12.0){hasil="Gizi Buruk";}
else if(b>=12.0 && b <13.6){hasil="Gizi Kurang";}
else if(b>=13.6 && b <=23.2){hasil="Gizi Baik";}
else if(b>23.2){hasil="Gizi Lebih";}
}
else if(umur==57){
if(b<12.1){hasil="Gizi Buruk";}
else if(b>=12.1 && b <13.7){hasil="Gizi Kurang";}
else if(b>=13.7 && b <=23.4){hasil="Gizi Baik";}
else if(b>23.4){hasil="Gizi Lebih";}
}
else if(umur==58){
if(b<12.2){hasil="Gizi Buruk";}
else if(b>=12.2 && b <13.8){hasil="Gizi Kurang";}
else if(b>=13.8 && b <=23.7){hasil="Gizi Baik";}
else if(b>23.7){hasil="Gizi Lebih";}
}
else if(umur==59){
if(b<12.3){hasil="Gizi Buruk";}
else if(b>=12.3 && b <14.0){hasil="Gizi Kurang";}
else if(b>=14.0 && b <=23.9){hasil="Gizi Baik";}
else if(b>23.9){hasil="Gizi Lebih";}
}
else if(umur==60){
if(b<12.4){hasil="Gizi Buruk";}
else if(b>=12.4 && b <14.1){hasil="Gizi Kurang";}
else if(b>=14.1 && b <=24.2){hasil="Gizi Baik";}
else if(b>24.2){hasil="Gizi Lebih";}
}
}
//==================================
if(jk.equalsIgnoreCase("Laki-laki")){
if(umur==0){
if(t<44.2){hasil2="Sangat Pendek";}
else if(t>=44.2 && t <46.1){hasil2="Pendek";}
else if(t>=46.1 && t <=53.7){hasil2="Normal";}
else if(t>53.7){hasil2="Tinggi";}
}
else if(umur==1){
if(t<43.9){hasil2="Sangat Pendek";}
else if(t>=43.9 && t <50.8){hasil2="Pendek";}
else if(t>=50.8 && t <=58.6){hasil2="Normal";}
else if(t>58.6){hasil2="Tinggi";}
}
else if(umur==2){
if(t<52.4){hasil2="Sangat Pendek";}
else if(t>=52.4 && t <54.4){hasil2="Pendek";}
else if(t>=54.4 && t <=62.4){hasil2="Normal";}
else if(t>62.4){hasil2="Tinggi";}
}
else if(umur==3){
if(t<55.3){hasil2="Sangat Pendek";}
else if(t>=55.3 && t <57.3){hasil2="Pendek";}
else if(t>=57.3 && t <=65.5){hasil2="Normal";}
else if(t>65.5){hasil2="Tinggi";}
}
else if(umur==4){
if(t<57.6){hasil2="Sangat Pendek";}
else if(t>=57.6 && t <59.7){hasil2="Pendek";}
else if(t>=59.7 && t <=68.0){hasil2="Normal";}
else if(t>68.0){hasil2="Tinggi";}
}
else if(umur==5){
if(t<59.6){hasil2="Sangat Pendek";}
else if(t>=59.6 && t <61.7){hasil2="Pendek";}
else if(t>=61.7 && t <=70.1){hasil2="Normal";}
else if(t>70.1){hasil2="Tinggi";}
}
else if(umur==6){
if(t<61.2){hasil2="Sangat Pendek";}
else if(t>=61.2 && t <63.3){hasil2="Pendek";}
else if(t>=63.3 && t <=71.9){hasil2="Normal";}
else if(t>71.9){hasil2="Tinggi";}
}
else if(umur==7){
if(t<62.7){hasil2="Sangat Pendek";}
else if(t>=62.7 && t <64.8){hasil2="Pendek";}
else if(t>=64.8 && t <=73.5){hasil2="Normal";}
else if(t>73.5){hasil2="Tinggi";}
}
else if(umur==8){
if(t<64.0){hasil2="Sangat Pendek";}
else if(t>=64.0 && t <66.0){hasil2="Pendek";}
else if(t>=66.2 && t <=75.0){hasil2="Normal";}
else if(t>75.0){hasil2="Tinggi";}
}
else if(umur==9){
if(t<65.2){hasil2="Sangat Pendek";}
else if(t>=65.2 && t <67.5){hasil2="Pendek";}
else if(t>=67.5 && t <=76.5){hasil2="Normal";}
else if(t>76.5){hasil2="Tinggi";}
}
else if(umur==10){
if(t<66.4){hasil2="Sangat Pendek";}
else if(t>=66.4 && t <68.7){hasil2="Pendek";}
else if(t>=68.7 && t <=77.9){hasil2="Normal";}
else if(t>77.9){hasil2="Tinggi";}
}
else if(umur==11){
if(t<67.6){hasil2="Sangat Pendek";}
else if(t>=67.6 && t <69.9){hasil2="Pendek";}
else if(t>=69.9 && t <=79.2){hasil2="Normal";}
else if(t>79.2){hasil2="Tinggi";}
}
else if(umur==12){
if(t<68.6){hasil2="Sangat Pendek";}
else if(t>=68.6 && t <71.0){hasil2="Pendek";}
else if(t>=71.0 && t <=80.5){hasil2="Normal";}
else if(t>80.5){hasil2="Tinggi";}
}
else if(umur==13){
if(t<69.6){hasil2="Sangat Pendek";}
else if(t>=69.6 && t <72.1){hasil2="Pendek";}
else if(t>=72.1 && t <=81.8){hasil2="Normal";}
else if(t>81.8){hasil2="Tinggi";}
}
else if(umur==14){
if(t<70.6){hasil2="Sangat Pendek";}
else if(t>=70.6 && t <73.1){hasil2="Pendek";}
else if(t>=73.1 && t <=83.0){hasil2="Normal";}
else if(t>83.0){hasil2="Tinggi";}
}
else if(umur==15){
if(t<71.6){hasil2="Sangat Pendek";}
else if(t>=71.6 && t <74.1){hasil2="Pendek";}
else if(t>=74.1 && t <=84.2){hasil2="Normal";}
else if(t>84.2){hasil2="Tinggi";}
}
else if(umur==16){
if(t<72.5){hasil2="Sangat Pendek";}
else if(t>=72.5 && t <75.0){hasil2="Pendek";}
else if(t>=75.0 && t <=85.4){hasil2="Normal";}
else if(t>85.4){hasil2="Tinggi";}
}
else if(umur==17){
if(t<73.3){hasil2="Sangat Pendek";}
else if(t>=73.3 && t <76.0){hasil2="Pendek";}
else if(t>=76.0 && t <=86.5){hasil2="Normal";}
else if(t>86.5){hasil2="Tinggi";}
}
else if(umur==18){
if(t<74.2){hasil2="Sangat Pendek";}
else if(t>=74.2 && t <76.9){hasil2="Pendek";}
else if(t>=76.9 && t <=87.7){hasil2="Normal";}
else if(t>87.7){hasil2="Tinggi";}
}
else if(umur==19){
if(t<75.0){hasil2="Sangat Pendek";}
else if(t>=75.0 && t <77.7){hasil2="Pendek";}
else if(t>=77.7 && t <=88.8){hasil2="Normal";}
else if(t>88.8){hasil2="Tinggi";}
}
else if(umur==20){
if(t<75.8){hasil2="Sangat Pendek";}
else if(t>=75.8 && t <78.6){hasil2="Pendek";}
else if(t>=78.6 && t <=89.6){hasil2="Normal";}
else if(t>89.6){hasil2="Tinggi";}
}
else if(umur==21){
if(t<76.5){hasil2="Sangat Pendek";}
else if(t>=76.5 && t <79.4){hasil2="Pendek";}
else if(t>=79.4 && t <=90.9){hasil2="Normal";}
else if(t>90.9){hasil2="Tinggi";}
}
else if(umur==22){
if(t<77.2){hasil2="Sangat Pendek";}
else if(t>=77.2 && t <80.2){hasil2="Pendek";}
else if(t>=80.2 && t <=91.9){hasil2="Normal";}
else if(t>91.9){hasil2="Tinggi";}
}
else if(umur==23){
if(t<78.0){hasil2="Sangat Pendek";}
else if(t>=78.0 && t <81.0){hasil2="Pendek";}
else if(t>=81.0 && t <=92.9){hasil2="Normal";}
else if(t>92.9){hasil2="Tinggi";}
}
else if(umur==24){
if(t<78.7){hasil2="Sangat Pendek";}
else if(t>=78.7 && t <81.7){hasil2="Pendek";}
else if(t>=81.7 && t <=93.9){hasil2="Normal";}
else if(t>93.9){hasil2="Tinggi";}
}
else if(umur==25){
if(t<78.6){hasil2="Sangat Pendek";}
else if(t>=78.6 && t <81.7){hasil2="Pendek";}
else if(t>=81.7 && t <=94.2){hasil2="Normal";}
else if(t>94.2){hasil2="Tinggi";}
}
else if(umur==26){
if(t<79.3){hasil2="Sangat Pendek";}
else if(t>=79.3 && t <82.5){hasil2="Pendek";}
else if(t>=82.5 && t <=95.2){hasil2="Normal";}
else if(t>95.2){hasil2="Tinggi";}
}
else if(umur==27){
if(t<79.9){hasil2="Sangat Pendek";}
else if(t>=79.9 && t <83.1){hasil2="Pendek";}
else if(t>=83.1 && t <=96.1){hasil2="Normal";}
else if(t>96.1){hasil2="Tinggi";}
}
else if(umur==28){
if(t<80.5){hasil2="Sangat Pendek";}
else if(t>=80.5 && t <83.8){hasil2="Pendek";}
else if(t>=83.8 && t <=97.0){hasil2="Normal";}
else if(t>97.0){hasil2="Tinggi";}
}
else if(umur==29){
if(t<81.1){hasil2="Sangat Pendek";}
else if(t>=81.1 && t <84.5){hasil2="Pendek";}
else if(t>=84.5 && t <=97.9){hasil2="Normal";}
else if(t>97.9){hasil2="Tinggi";}
}
else if(umur==30){
if(t<81.7){hasil2="Sangat Pendek";}
else if(t>=81.7 && t <85.1){hasil2="Pendek";}
else if(t>=85.1 && t <=98.7){hasil2="Normal";}
else if(t>98.7){hasil2="Tinggi";}
}
else if(umur==31){
if(t<82.3){hasil2="Sangat Pendek";}
else if(t>=82.3 && t <85.7){hasil2="Pendek";}
else if(t>=85.7 && t <=99.6){hasil2="Normal";}
else if(t>99.6){hasil2="Tinggi";}
}
else if(umur==32){
if(t<82.8){hasil2="Sangat Pendek";}
else if(t>=82.8 && t <86.4){hasil2="Pendek";}
else if(t>=86.4 && t <=100.4){hasil2="Normal";}
else if(t>100.4){hasil2="Tinggi";}
}
else if(umur==33){
if(t<83.4){hasil2="Sangat Pendek";}
else if(t>=83.4 && t <86.9){hasil2="Pendek";}
else if(t>=86.9 && t <=101.2){hasil2="Normal";}
else if(t>101.2){hasil2="Tinggi";}
}
else if(umur==34){
if(t<83.9){hasil2="Sangat Pendek";}
else if(t>=83.9 && t <87.5){hasil2="Pendek";}
else if(t>=87.5 && t <=102.0){hasil2="Normal";}
else if(t>102.0){hasil2="Tinggi";}
}
else if(umur==35){
if(t<84.4){hasil2="Sangat Pendek";}
else if(t>=84.4 && t <88.1){hasil2="Pendek";}
else if(t>=88.1 && t <=102.7){hasil2="Normal";}
else if(t>102.7){hasil2="Tinggi";}
}
else if(umur==36){
if(t<85.0){hasil2="Sangat Pendek";}
else if(t>=85.0 && t <88.7){hasil2="Pendek";}
else if(t>=88.7 && t <=103.5){hasil2="Normal";}
else if(t>103.5){hasil2="Tinggi";}
}
else if(umur==37){
if(t<85.5){hasil2="Sangat Pendek";}
else if(t>=85.5 && t <89.2){hasil2="Pendek";}
else if(t>=89.2 && t <=104.2){hasil2="Normal";}
else if(t>104.2){hasil2="Tinggi";}
}
else if(umur==38){
if(t<86.0){hasil2="Sangat Pendek";}
else if(t>=86.0 && t <89.8){hasil2="Pendek";}
else if(t>=89.8 && t <=105.0){hasil2="Normal";}
else if(t>105.0){hasil2="Tinggi";}
}
else if(umur==39){
if(t<86.5){hasil2="Sangat Pendek";}
else if(t>=86.5 && t <90.3){hasil2="Pendek";}
else if(t>=90.3 && t <=105.7){hasil2="Normal";}
else if(t>105.7){hasil2="Tinggi";}
}
else if(umur==40){
if(t<87.0){hasil2="Sangat Pendek";}
else if(t>=87.0 && t <90.9){hasil2="Pendek";}
else if(t>=90.9 && t <=106.4){hasil2="Normal";}
else if(t>106.4){hasil2="Tinggi";}
}
else if(umur==41){
if(t<87.5){hasil2="Sangat Pendek";}
else if(t>=87.5 && t <91.4){hasil2="Pendek";}
else if(t>=91.4 && t <=107.1){hasil2="Normal";}
else if(t>107.1){hasil2="Tinggi";}
}
else if(umur==42){
if(t<88.0){hasil2="Sangat Pendek";}
else if(t>=88.0 && t <91.9){hasil2="Pendek";}
else if(t>=91.9 && t <=107.8){hasil2="Normal";}
else if(t>107.8){hasil2="Tinggi";}
}
else if(umur==43){
if(t<88.4){hasil2="Sangat Pendek";}
else if(t>=88.4 && t <92.4){hasil2="Pendek";}
else if(t>=92.4 && t <=108.5){hasil2="Normal";}
else if(t>108.5){hasil2="Tinggi";}
}
else if(umur==44){
if(t<88.9){hasil2="Sangat Pendek";}
else if(t>=88.9 && t <93.0){hasil2="Pendek";}
else if(t>=93.0 && t <=109.1){hasil2="Normal";}
else if(t>109.1){hasil2="Tinggi";}
}
else if(umur==45){
if(t<89.4){hasil2="Sangat Pendek";}
else if(t>=89.4 && t <93.5){hasil2="Pendek";}
else if(t>=93.5 && t <=109.8){hasil2="Normal";}
else if(t>109.8){hasil2="Tinggi";}
}
else if(umur==46){
if(t<89.8){hasil2="Sangat Pendek";}
else if(t>=89.8 && t <94.0){hasil2="Pendek";}
else if(t>=94.0 && t <=110.4){hasil2="Normal";}
else if(t>110.4){hasil2="Tinggi";}
}
else if(umur==47){
if(t<90.3){hasil2="Sangat Pendek";}
else if(t>=90.3 && t <94.4){hasil2="Pendek";}
else if(t>=94.4 && t <=111.1){hasil2="Normal";}
else if(t>111.1){hasil2="Tinggi";}
}
else if(umur==48){
if(t<90.7){hasil2="Sangat Pendek";}
else if(t>=90.7 && t <94.9){hasil2="Pendek";}
else if(t>=94.9 && t <=111.7){hasil2="Normal";}
else if(t>111.7){hasil2="Tinggi";}
}
else if(umur==49){
if(t<91.2){hasil2="Sangat Pendek";}
else if(t>=91.2 && t <95.4){hasil2="Pendek";}
else if(t>=95.4 && t <=112.4){hasil2="Normal";}
else if(t>112.4){hasil2="Tinggi";}
}
else if(umur==50){
if(t<91.6){hasil2="Sangat Pendek";}
else if(t>=91.6 && t <95.9){hasil2="Pendek";}
else if(t>=95.9 && t <=113.0){hasil2="Normal";}
else if(t>113.0){hasil2="Tinggi";}
}
else if(umur==51){
if(t<92.1){hasil2="Sangat Pendek";}
else if(t>=92.1 && t <96.4){hasil2="Pendek";}
else if(t>=96.4 && t <=113.6){hasil2="Normal";}
else if(t>113.6){hasil2="Tinggi";}
}
else if(umur==52){
if(t<92.5){hasil2="Sangat Pendek";}
else if(t>=92.5 && t <96.9){hasil2="Pendek";}
else if(t>=96.9 && t <=114.2){hasil2="Normal";}
else if(t>114.2){hasil2="Tinggi";}
}
else if(umur==53){
if(t<93.0){hasil2="Sangat Pendek";}
else if(t>=93.0 && t <97.4){hasil2="Pendek";}
else if(t>=97.4 && t <=114.9){hasil2="Normal";}
else if(t>114.9){hasil2="Tinggi";}
}
else if(umur==54){
if(t<93.4){hasil2="Sangat Pendek";}
else if(t>=93.4 && t <97.8){hasil2="Pendek";}
else if(t>=97.8 && t <=115.5){hasil2="Normal";}
else if(t>115.5){hasil2="Tinggi";}
}
else if(umur==55){
if(t<93.9){hasil2="Sangat Pendek";}
else if(t>=93.9 && t <98.3){hasil2="Pendek";}
else if(t>=98.3 && t <=116.1){hasil2="Normal";}
else if(t>116.1){hasil2="Tinggi";}
}
else if(umur==56){
if(t<94.3){hasil2="Sangat Pendek";}
else if(t>=94.3 && t <98.8){hasil2="Pendek";}
else if(t>=98.8 && t <=116.7){hasil2="Normal";}
else if(t>116.7){hasil2="Tinggi";}
}
else if(umur==57){
if(t<94.7){hasil2="Sangat Pendek";}
else if(t>=94.7 && t <99.3){hasil2="Pendek";}
else if(t>=99.3 && t <=117.4){hasil2="Normal";}
else if(t>117.4){hasil2="Tinggi";}
}
else if(umur==58){
if(t<95.2){hasil2="Sangat Pendek";}
else if(t>=95.2 && t <99.7){hasil2="Pendek";}
else if(t>=99.7 && t <=118.0){hasil2="Normal";}
else if(t>118.0){hasil2="Tinggi";}
}
else if(umur==59){
if(t<95.6){hasil2="Sangat Pendek";}
else if(t>=95.6 && t <100.2){hasil2="Pendek";}
else if(t>=100.2 && t <=118.6){hasil2="Normal";}
else if(t>118.6){hasil2="Tinggi";}
}
else if(umur==60){
if(t<96.1){hasil2="Sangat Pendek";}
else if(t>=96.1 && t <100.7){hasil2="Pendek";}
else if(t>=100.7 && t <=119.2){hasil2="Normal";}
else if(t>119.2){hasil2="Tinggi";}
}
}
//===============================================
if(jk.equalsIgnoreCase("Perempuan")){
if(umur==0){
if(b<2.0){hasil="Gizi Buruk";}
else if(b>=2.0 && b <2.4){hasil="Gizi Kurang";}
else if(b>=2.4 && b <=4.2){hasil="Gizi Baik";}
else if(b>4.2){hasil="Gizi Lebih";}
}
else if(umur==1){
if(b<2.7){hasil="Gizi Buruk";}
else if(b>=2.7 && b <3.2){hasil="Gizi Kurang";}
else if(b>=3.2 && b <=5.5){hasil="Gizi Baik";}
else if(b>5.5){hasil="Gizi Lebih";}
}
else if(umur==2){
if(b<3.4){hasil="Gizi Buruk";}
else if(b>=3.4 && b <3.9){hasil="Gizi Kurang";}
else if(b>=3.9 && b <=6.6){hasil="Gizi Baik";}
else if(b>6.6){hasil="Gizi Lebih";}
}
else if(umur==3){
if(b<4.0){hasil="Gizi Buruk";}
else if(b>=4.0 && b <4.5){hasil="Gizi Kurang";}
else if(b>=4.5 && b <=7.5){hasil="Gizi Baik";}
else if(b>7.5){hasil="Gizi Lebih";}
}
else if(umur==4){
if(b<4.4){hasil="Gizi Buruk";}
else if(b>=4.4 && b <5.0){hasil="Gizi Kurang";}
else if(b>=5.0 && b <=8.2){hasil="Gizi Baik";}
else if(b>8.2){hasil="Gizi Lebih";}
}
else if(umur==5){
if(b<4.8){hasil="Gizi Buruk";}
else if(b>=4.8 && b <5.4){hasil="Gizi Kurang";}
else if(b>=5.4 && b <=8.8){hasil="Gizi Baik";}
else if(b>8.8){hasil="Gizi Lebih";}
}
else if(umur==6){
if(b<5.1){hasil="Gizi Buruk";}
else if(b>=5.1 && b <5.7){hasil="Gizi Kurang";}
else if(b>=5.7 && b <=9.3){hasil="Gizi Baik";}
else if(b>9.3){hasil="Gizi Lebih";}
}
else if(umur==7){
if(b<5.3){hasil="Gizi Buruk";}
else if(b>=5.3 && b <6.0){hasil="Gizi Kurang";}
else if(b>=6.0 && b <=9.8){hasil="Gizi Baik";}
else if(b>9.8){hasil="Gizi Lebih";}
}
else if(umur==8){
if(b<5.6){hasil="Gizi Buruk";}
else if(b>=5.6 && b <6.3){hasil="Gizi Kurang";}
else if(b>=6.3 && b <=10.2){hasil="Gizi Baik";}
else if(b>10.2){hasil="Gizi Lebih";}
}
else if(umur==9){
if(b<5.8){hasil="Gizi Buruk";}
else if(b>=5.8 && b <6.5){hasil="Gizi Kurang";}
else if(b>=6.5 && b <=10.5){hasil="Gizi Baik";}
else if(b>10.5){hasil="Gizi Lebih";}
}
else if(umur==10){
if(b<5.9){hasil="Gizi Buruk";}
else if(b>=5.9 && b <6.7){hasil="Gizi Kurang";}
else if(b>=6.7 && b <=10.9){hasil="Gizi Baik";}
else if(b>10.9){hasil="Gizi Lebih";}
}
else if(umur==11){
if(b<6.1){hasil="Gizi Buruk";}
else if(b>=6.1 && b <6.9){hasil="Gizi Kurang";}
else if(b>=6.9 && b <=11.2){hasil="Gizi Baik";}
else if(b>11.2){hasil="Gizi Lebih";}
}
else if(umur==12){
if(b<6.3){hasil="Gizi Buruk";}
else if(b>=6.3 && b <7.0){hasil="Gizi Kurang";}
else if(b>=7.0 && b <=11.5){hasil="Gizi Baik";}
else if(b>11.5){hasil="Gizi Lebih";}
}
else if(umur==13){
if(b<6.4){hasil="Gizi Buruk";}
else if(b>=6.4 && b <7.2){hasil="Gizi Kurang";}
else if(b>=7.2 && b <=11.8){hasil="Gizi Baik";}
else if(b>11.8){hasil="Gizi Lebih";}
}
else if(umur==14){
if(b<6.6){hasil="Gizi Buruk";}
else if(b>=6.6 && b <7.4){hasil="Gizi Kurang";}
else if(b>=7.4 && b <=12.1){hasil="Gizi Baik";}
else if(b>12.1){hasil="Gizi Lebih";}
}
else if(umur==15){
if(b<6.7){hasil="Gizi Buruk";}
else if(b>=6.7 && b <7.6){hasil="Gizi Kurang";}
else if(b>=7.6 && b <=12.4){hasil="Gizi Baik";}
else if(b>12.4){hasil="Gizi Lebih";}
}
else if(umur==16){
if(b<6.9){hasil="Gizi Buruk";}
else if(b>=6.9 && b <7.7){hasil="Gizi Kurang";}
else if(b>=7.7 && b <=12.6){hasil="Gizi Baik";}
else if(b>12.6){hasil="Gizi Lebih";}
}
else if(umur==17){
if(b<7.0){hasil="Gizi Buruk";}
else if(b>=7.0 && b <7.9){hasil="Gizi Kurang";}
else if(b>=7.9 && b <=12.9){hasil="Gizi Baik";}
else if(b>12.9){hasil="Gizi Lebih";}
}
else if(umur==18){
if(b<7.2){hasil="Gizi Buruk";}
else if(b>=7.2 && b <8.1){hasil="Gizi Kurang";}
else if(b>=8.1 && b <=13.2){hasil="Gizi Baik";}
else if(b>13.2){hasil="Gizi Lebih";}
}
else if(umur==19){
if(b<7.3){hasil="Gizi Buruk";}
else if(b>=7.3 && b <8.2){hasil="Gizi Kurang";}
else if(b>=8.2 && b <=13.5){hasil="Gizi Baik";}
else if(b>13.5){hasil="Gizi Lebih";}
}
else if(umur==20){
if(b<7.5){hasil="Gizi Buruk";}
else if(b>=7.5 && b <8.4){hasil="Gizi Kurang";}
else if(b>=8.4 && b <=13.7){hasil="Gizi Baik";}
else if(b>13.7){hasil="Gizi Lebih";}
}
else if(umur==21){
if(b<7.6){hasil="Gizi Buruk";}
else if(b>=7.6 && b <8.6){hasil="Gizi Kurang";}
else if(b>=8.6 && b <=14.0){hasil="Gizi Baik";}
else if(b>14.0){hasil="Gizi Lebih";}
}
else if(umur==22){
if(b<7.8){hasil="Gizi Buruk";}
else if(b>=7.8 && b <8.7){hasil="Gizi Kurang";}
else if(b>=8.7 && b <=14.3){hasil="Gizi Baik";}
else if(b>14.3){hasil="Gizi Lebih";}
}
else if(umur==23){
if(b<7.9){hasil="Gizi Buruk";}
else if(b>=7.9 && b <8.9){hasil="Gizi Kurang";}
else if(b>=8.9 && b <=14.6){hasil="Gizi Baik";}
else if(b>14.6){hasil="Gizi Lebih";}
}
else if(umur==24){
if(b<8.1){hasil="Gizi Buruk";}
else if(b>=8.1 && b <9.0){hasil="Gizi Kurang";}
else if(b>=9.0 && b <=14.8){hasil="Gizi Baik";}
else if(b>14.8){hasil="Gizi Lebih";}
}
else if(umur==25){
if(b<8.2){hasil="Gizi Buruk";}
else if(b>=8.2 && b <9.2){hasil="Gizi Kurang";}
else if(b>=9.2 && b <=15.1){hasil="Gizi Baik";}
else if(b>15.1){hasil="Gizi Lebih";}
}
else if(umur==26){
if(b<8.4){hasil="Gizi Buruk";}
else if(b>=8.4 && b <9.4){hasil="Gizi Kurang";}
else if(b>=9.4 && b <=15.1){hasil="Gizi Baik";}
else if(b>15.1){hasil="Gizi Lebih";}
}
else if(umur==27){
if(b<8.5){hasil="Gizi Buruk";}
else if(b>=8.5 && b <9.5){hasil="Gizi Kurang";}
else if(b>=9.5 && b <=15.7){hasil="Gizi Baik";}
else if(b>15.7){hasil="Gizi Lebih";}
}
else if(umur==28){
if(b<8.6){hasil="Gizi Buruk";}
else if(b>=8.6 && b <9.7){hasil="Gizi Kurang";}
else if(b>=9.7 && b <=16.0){hasil="Gizi Baik";}
else if(b>16.0){hasil="Gizi Lebih";}
}
else if(umur==29){
if(b<8.8){hasil="Gizi Buruk";}
else if(b>=8.8 && b <9.8){hasil="Gizi Kurang";}
else if(b>=9.8 && b <=16.2){hasil="Gizi Baik";}
else if(b>16.2){hasil="Gizi Lebih";}
}
else if(umur==30){
if(b<8.9){hasil="Gizi Buruk";}
else if(b>=8.9 && b <10.0){hasil="Gizi Kurang";}
else if(b>=10.0 && b <=16.5){hasil="Gizi Baik";}
else if(b>16.5){hasil="Gizi Lebih";}
}
else if(umur==31){
if(b<9.0){hasil="Gizi Buruk";}
else if(b>=9.0 && b <10.1){hasil="Gizi Kurang";}
else if(b>=10.1 && b <=16.8){hasil="Gizi Baik";}
else if(b>16.8){hasil="Gizi Lebih";}
}
else if(umur==32){
if(b<9.1){hasil="Gizi Buruk";}
else if(b>=9.1 && b <10.3){hasil="Gizi Kurang";}
else if(b>=10.3 && b <=17.1){hasil="Gizi Baik";}
else if(b>17.1){hasil="Gizi Lebih";}
}
else if(umur==33){
if(b<9.3){hasil="Gizi Buruk";}
else if(b>=9.3 && b <10.4){hasil="Gizi Kurang";}
else if(b>=10.4 && b <=17.3){hasil="Gizi Baik";}
else if(b>17.3){hasil="Gizi Lebih";}
}
else if(umur==34){
if(b<9.4){hasil="Gizi Buruk";}
else if(b>=9.4 && b <10.5){hasil="Gizi Kurang";}
else if(b>=10.5 && b <=17.6){hasil="Gizi Baik";}
else if(b>17.6){hasil="Gizi Lebih";}
}
else if(umur==35){
if(b<9.5){hasil="Gizi Buruk";}
else if(b>=9.5 && b <10.7){hasil="Gizi Kurang";}
else if(b>=10.7 && b <=17.9){hasil="Gizi Baik";}
else if(b>17.9){hasil="Gizi Lebih";}
}
else if(umur==36){
if(b<9.6){hasil="Gizi Buruk";}
else if(b>=9.6 && b <10.8){hasil="Gizi Kurang";}
else if(b>=10.8 && b <=18.1){hasil="Gizi Baik";}
else if(b>18.1){hasil="Gizi Lebih";}
}
else if(umur==37){
if(b<9.7){hasil="Gizi Buruk";}
else if(b>=9.7 && b <10.9){hasil="Gizi Kurang";}
else if(b>=10.9 && b <=18.4){hasil="Gizi Baik";}
else if(b>18.4){hasil="Gizi Lebih";}
}
else if(umur==38){
if(b<9.8){hasil="Gizi Buruk";}
else if(b>=9.8 && b <11.1){hasil="Gizi Kurang";}
else if(b>=11.1 && b <=18.7){hasil="Gizi Baik";}
else if(b>18.7){hasil="Gizi Lebih";}
}
else if(umur==39){
if(b<9.9){hasil="Gizi Buruk";}
else if(b>=9.9 && b <11.2){hasil="Gizi Kurang";}
else if(b>=11.2 && b <=19.0){hasil="Gizi Baik";}
else if(b>19.0){hasil="Gizi Lebih";}
}
else if(umur==40){
if(b<10.1){hasil="Gizi Buruk";}
else if(b>=10.1 && b <11.3){hasil="Gizi Kurang";}
else if(b>=11.3 && b <=19.2){hasil="Gizi Baik";}
else if(b>19.2){hasil="Gizi Lebih";}
}
else if(umur==41){
if(b<10.2){hasil="Gizi Buruk";}
else if(b>=10.2 && b <11.5){hasil="Gizi Kurang";}
else if(b>=11.5 && b <=19.5){hasil="Gizi Baik";}
else if(b>19.5){hasil="Gizi Lebih";}
}
else if(umur==42){
if(b<10.3){hasil="Gizi Buruk";}
else if(b>=10.3 && b <11.6){hasil="Gizi Kurang";}
else if(b>=11.6 && b <=19.8){hasil="Gizi Baik";}
else if(b>19.8){hasil="Gizi Lebih";}
}
else if(umur==43){
if(b<10.4){hasil="Gizi Buruk";}
else if(b>=10.4 && b <11.7){hasil="Gizi Kurang";}
else if(b>=11.7 && b <=20.1){hasil="Gizi Baik";}
else if(b>20.1){hasil="Gizi Lebih";}
}
else if(umur==44){
if(b<10.5){hasil="Gizi Buruk";}
else if(b>=10.5 && b <11.8){hasil="Gizi Kurang";}
else if(b>=11.8 && b <=20.4){hasil="Gizi Baik";}
else if(b>20.4){hasil="Gizi Lebih";}
}
else if(umur==45){
if(b<10.6){hasil="Gizi Buruk";}
else if(b>=10.6 && b <12.0){hasil="Gizi Kurang";}
else if(b>=12.0 && b <=20.7){hasil="Gizi Baik";}
else if(b>20.7){hasil="Gizi Lebih";}
}
else if(umur==46){
if(b<10.7){hasil="Gizi Buruk";}
else if(b>=10.7 && b <12.1){hasil="Gizi Kurang";}
else if(b>=12.1 && b <=20.9){hasil="Gizi Baik";}
else if(b>20.9){hasil="Gizi Lebih";}
}
else if(umur==47){
if(b<10.8){hasil="Gizi Buruk";}
else if(b>=10.8 && b <12.2){hasil="Gizi Kurang";}
else if(b>=12.2 && b <=21.2){hasil="Gizi Baik";}
else if(b>21.2){hasil="Gizi Lebih";}
}
else if(umur==48){
if(b<10.9){hasil="Gizi Buruk";}
else if(b>=10.9 && b <12.3){hasil="Gizi Kurang";}
else if(b>=12.3 && b <=21.5){hasil="Gizi Baik";}
else if(b>21.5){hasil="Gizi Lebih";}
}
else if(umur==49){
if(b<11.0){hasil="Gizi Buruk";}
else if(b>=11.0 && b <12.4){hasil="Gizi Kurang";}
else if(b>=12.4 && b <=21.8){hasil="Gizi Baik";}
else if(b>21.8){hasil="Gizi Lebih";}
}
else if(umur==50){
if(b<11.1){hasil="Gizi Buruk";}
else if(b>=11.1 && b <12.6){hasil="Gizi Kurang";}
else if(b>=12.6 && b <=22.1){hasil="Gizi Baik";}
else if(b>22.1){hasil="Gizi Lebih";}
}
else if(umur==51){
if(b<11.2){hasil="Gizi Buruk";}
else if(b>=11.2 && b <12.7){hasil="Gizi Kurang";}
else if(b>=12.7 && b <=22.4){hasil="Gizi Baik";}
else if(b>22.4){hasil="Gizi Lebih";}
}
else if(umur==52){
if(b<11.3){hasil="Gizi Buruk";}
else if(b>=11.3 && b <12.8){hasil="Gizi Kurang";}
else if(b>=12.8 && b <=22.6){hasil="Gizi Baik";}
else if(b>22.6){hasil="Gizi Lebih";}
}
else if(umur==53){
if(b<11.4){hasil="Gizi Buruk";}
else if(b>=11.4 && b <12.9){hasil="Gizi Kurang";}
else if(b>=12.9 && b <=22.9){hasil="Gizi Baik";}
else if(b>22.9){hasil="Gizi Lebih";}
}
else if(umur==54){
if(b<11.5){hasil="Gizi Buruk";}
else if(b>=11.5 && b <13.0){hasil="Gizi Kurang";}
else if(b>=13.0 && b <=23.2){hasil="Gizi Baik";}
else if(b>23.2){hasil="Gizi Lebih";}
}
else if(umur==55){
if(b<11.6){hasil="Gizi Buruk";}
else if(b>=11.6 && b <13.2){hasil="Gizi Kurang";}
else if(b>=13.2 && b <=23.5){hasil="Gizi Baik";}
else if(b>23.5){hasil="Gizi Lebih";}
}
else if(umur==56){
if(b<11.7){hasil="Gizi Buruk";}
else if(b>=11.7 && b <13.3){hasil="Gizi Kurang";}
else if(b>=13.3 && b <=23.8){hasil="Gizi Baik";}
else if(b>23.8){hasil="Gizi Lebih";}
}
else if(umur==57){
if(b<11.8){hasil="Gizi Buruk";}
else if(b>=11.8 && b <13.4){hasil="Gizi Kurang";}
else if(b>=13.4 && b <=24.1){hasil="Gizi Baik";}
else if(b>24.1){hasil="Gizi Lebih";}
}
else if(umur==58){
if(b<11.9){hasil="Gizi Buruk";}
else if(b>=11.9 && b <13.5){hasil="Gizi Kurang";}
else if(b>=13.5 && b <=24.4){hasil="Gizi Baik";}
else if(b>24.4){hasil="Gizi Lebih";}
}
else if(umur==59){
if(b<12.0){hasil="Gizi Buruk";}
else if(b>=12.0 && b <13.6){hasil="Gizi Kurang";}
else if(b>=13.6 && b <=24.6){hasil="Gizi Baik";}
else if(b>24.6){hasil="Gizi Lebih";}
}
else if(umur==60){
if(b<12.1){hasil="Gizi Buruk";}
else if(b>=12.1 && b <13.7){hasil="Gizi Kurang";}
else if(b>=13.7 && b <=24.9){hasil="Gizi Baik";}
else if(b>24.9){hasil="Gizi Lebih";}
}
}
//==================================
if(jk.equalsIgnoreCase("Perempuan")){
if(umur==0){
if(t<43.0){hasil2="Sangat Pendek";}
else if(t>=43.0 && t <45.4){hasil2="Pendek";}
else if(t>=45.4 && t <=52.9){hasil2="Normal";}
else if(t>52.9){hasil2="Tinggi";}
}
else if(umur==1){
if(t<47.8){hasil2="Sangat Pendek";}
else if(t>=47.8 && t <49.8){hasil2="Pendek";}
else if(t>=49.8 && t <=57.6){hasil2="Normal";}
else if(t>57.6){hasil2="Tinggi";}
}
else if(umur==2){
if(t<51.0){hasil2="Sangat Pendek";}
else if(t>=51.0 && t <53.0){hasil2="Pendek";}
else if(t>=53.0 && t <=61.1){hasil2="Normal";}
else if(t>61.1){hasil2="Tinggi";}
}
else if(umur==3){
if(t<53.5){hasil2="Sangat Pendek";}
else if(t>=53.5 && t <55.6){hasil2="Pendek";}
else if(t>=55.6 && t <=64.0){hasil2="Normal";}
else if(t>64.0){hasil2="Tinggi";}
}
else if(umur==4){
if(t<55.6){hasil2="Sangat Pendek";}
else if(t>=55.6 && t <57.8){hasil2="Pendek";}
else if(t>=57.8 && t <=66.4){hasil2="Normal";}
else if(t>66.4){hasil2="Tinggi";}
}
else if(umur==5){
if(t<57.4){hasil2="Sangat Pendek";}
else if(t>=57.4 && t <59.6){hasil2="Pendek";}
else if(t>=59.6 && t <=68.5){hasil2="Normal";}
else if(t>68.5){hasil2="Tinggi";}
}
else if(umur==6){
if(t<58.9){hasil2="Sangat Pendek";}
else if(t>=58.9 && t <61.2){hasil2="Pendek";}
else if(t>=61.2 && t <=70.3){hasil2="Normal";}
else if(t>70.3){hasil2="Tinggi";}
}
else if(umur==7){
if(t<60.3){hasil2="Sangat Pendek";}
else if(t>=62.7 && t <62.7){hasil2="Pendek";}
else if(t>=62.7 && t <=71.9){hasil2="Normal";}
else if(t>71.9){hasil2="Tinggi";}
}
else if(umur==8){
if(t<61.7){hasil2="Sangat Pendek";}
else if(t>=61.7 && t <61.7){hasil2="Pendek";}
else if(t>=64.0 && t <=73.5){hasil2="Normal";}
else if(t>73.5){hasil2="Tinggi";}
}
else if(umur==9){
if(t<62.9){hasil2="Sangat Pendek";}
else if(t>=62.9 && t <65.3){hasil2="Pendek";}
else if(t>=65.3 && t <=75.0){hasil2="Normal";}
else if(t>75.0){hasil2="Tinggi";}
}
else if(umur==10){
if(t<64.1){hasil2="Sangat Pendek";}
else if(t>=64.1 && t <66.5){hasil2="Pendek";}
else if(t>=66.5 && t <=76.4){hasil2="Normal";}
else if(t>76.4){hasil2="Tinggi";}
}
else if(umur==11){
if(t<65.2){hasil2="Sangat Pendek";}
else if(t>=65.2 && t <67.7){hasil2="Pendek";}
else if(t>=67.7 && t <=77.8){hasil2="Normal";}
else if(t>77.8){hasil2="Tinggi";}
}
else if(umur==12){
if(t<66.3){hasil2="Sangat Pendek";}
else if(t>=66.3 && t <68.9){hasil2="Pendek";}
else if(t>=68.9 && t <=68.9){hasil2="Normal";}
else if(t>79.2){hasil2="Tinggi";}
}
else if(umur==13){
if(t<67.3){hasil2="Sangat Pendek";}
else if(t>=67.3 && t <70.0){hasil2="Pendek";}
else if(t>=70.0 && t <=85.0){hasil2="Normal";}
else if(t>85.0){hasil2="Tinggi";}
}
else if(umur==14){
if(t<68.3){hasil2="Sangat Pendek";}
else if(t>=68.3 && t <71.0){hasil2="Pendek";}
else if(t>=71.0 && t <=81.7){hasil2="Normal";}
else if(t>81.7){hasil2="Tinggi";}
}
else if(umur==15){
if(t<69.3){hasil2="Sangat Pendek";}
else if(t>=69.3 && t <72.0){hasil2="Pendek";}
else if(t>=72.0 && t <=83.0){hasil2="Normal";}
else if(t>83.0){hasil2="Tinggi";}
}
else if(umur==16){
if(t<70.2){hasil2="Sangat Pendek";}
else if(t>=70.2 && t <73.0){hasil2="Pendek";}
else if(t>=73.0 && t <=84.2){hasil2="Normal";}
else if(t>84.2){hasil2="Tinggi";}
}
else if(umur==17){
if(t<71.1){hasil2="Sangat Pendek";}
else if(t>=71.1 && t <74.0){hasil2="Pendek";}
else if(t>=74.0 && t <=85.4){hasil2="Normal";}
else if(t>85.4){hasil2="Tinggi";}
}
else if(umur==18){
if(t<72.0){hasil2="Sangat Pendek";}
else if(t>=72.0 && t <74.9){hasil2="Pendek";}
else if(t>=74.9 && t <=86.5){hasil2="Normal";}
else if(t>86.5){hasil2="Tinggi";}
}
else if(umur==19){
if(t<72.8){hasil2="Sangat Pendek";}
else if(t>=72.8 && t <75.8){hasil2="Pendek";}
else if(t>=75.8 && t <=87.6){hasil2="Normal";}
else if(t>87.6){hasil2="Tinggi";}
}
else if(umur==20){
if(t<73.7){hasil2="Sangat Pendek";}
else if(t>=73.7 && t <76.7){hasil2="Pendek";}
else if(t>=76.7 && t <=88.7){hasil2="Normal";}
else if(t>88.7){hasil2="Tinggi";}
}
else if(umur==21){
if(t<74.5){hasil2="Sangat Pendek";}
else if(t>=74.5 && t <77.5){hasil2="Pendek";}
else if(t>=77.5 && t <=89.8){hasil2="Normal";}
else if(t>89.8){hasil2="Tinggi";}
}
else if(umur==22){
if(t<75.2){hasil2="Sangat Pendek";}
else if(t>=75.2 && t <78.4){hasil2="Pendek";}
else if(t>=78.4 && t <=90.8){hasil2="Normal";}
else if(t>90.8){hasil2="Tinggi";}
}
else if(umur==23){
if(t<76.0){hasil2="Sangat Pendek";}
else if(t>=76.0 && t <79.2){hasil2="Pendek";}
else if(t>=79.2 && t <=91.9){hasil2="Normal";}
else if(t>91.9){hasil2="Tinggi";}
}
else if(umur==24){
if(t<76.7){hasil2="Sangat Pendek";}
else if(t>=76.7 && t <80.0){hasil2="Pendek";}
else if(t>=80.0 && t <=92.9){hasil2="Normal";}
else if(t>92.9){hasil2="Tinggi";}
}
else if(umur==25){
if(t<76.8){hasil2="Sangat Pendek";}
else if(t>=76.8 && t <80.0){hasil2="Pendek";}
else if(t>=80.0 && t <=93.1){hasil2="Normal";}
else if(t>93.1){hasil2="Tinggi";}
}
else if(umur==26){
if(t<77.5){hasil2="Sangat Pendek";}
else if(t>=77.5 && t <80.8){hasil2="Pendek";}
else if(t>=80.8 && t <=94.1){hasil2="Normal";}
else if(t>94.1){hasil2="Tinggi";}
}
else if(umur==27){
if(t<78.1){hasil2="Sangat Pendek";}
else if(t>=78.1 && t <81.5){hasil2="Pendek";}
else if(t>=81.5 && t <=95.0){hasil2="Normal";}
else if(t>95.0){hasil2="Tinggi";}
}
else if(umur==28){
if(t<78.8){hasil2="Sangat Pendek";}
else if(t>=78.8 && t <82.2){hasil2="Pendek";}
else if(t>=82.2 && t <=96.0){hasil2="Normal";}
else if(t>96.0){hasil2="Tinggi";}
}
else if(umur==29){
if(t<79.5){hasil2="Sangat Pendek";}
else if(t>=79.5 && t <82.9){hasil2="Pendek";}
else if(t>=82.9 && t <=96.9){hasil2="Normal";}
else if(t>96.9){hasil2="Tinggi";}
}
else if(umur==30){
if(t<80.1){hasil2="Sangat Pendek";}
else if(t>=80.1 && t <83.6){hasil2="Pendek";}
else if(t>=83.6 && t <=97.7){hasil2="Normal";}
else if(t>97.7){hasil2="Tinggi";}
}
else if(umur==31){
if(t<80.7){hasil2="Sangat Pendek";}
else if(t>=80.7 && t <84.3){hasil2="Pendek";}
else if(t>=84.3 && t <=98.6){hasil2="Normal";}
else if(t>98.6){hasil2="Tinggi";}
}
else if(umur==32){
if(t<81.3){hasil2="Sangat Pendek";}
else if(t>=81.3 && t <84.9){hasil2="Pendek";}
else if(t>=84.9 && t <=99.4){hasil2="Normal";}
else if(t>99.4){hasil2="Tinggi";}
}
else if(umur==33){
if(t<81.9){hasil2="Sangat Pendek";}
else if(t>=81.9 && t <85.6){hasil2="Pendek";}
else if(t>=85.6 && t <=100.3){hasil2="Normal";}
else if(t>100.3){hasil2="Tinggi";}
}
else if(umur==34){
if(t<82.5){hasil2="Sangat Pendek";}
else if(t>=82.5 && t <86.2){hasil2="Pendek";}
else if(t>=86.2 && t <=101.1){hasil2="Normal";}
else if(t>101.1){hasil2="Tinggi";}
}
else if(umur==35){
if(t<83.1){hasil2="Sangat Pendek";}
else if(t>=83.1 && t <86.8){hasil2="Pendek";}
else if(t>=86.8 && t <=101.9){hasil2="Normal";}
else if(t>101.9){hasil2="Tinggi";}
}
else if(umur==36){
if(t<83.6){hasil2="Sangat Pendek";}
else if(t>=83.6 && t <87.4){hasil2="Pendek";}
else if(t>=87.4 && t <=102.7){hasil2="Normal";}
else if(t>102.7){hasil2="Tinggi";}
}
else if(umur==37){
if(t<84.2){hasil2="Sangat Pendek";}
else if(t>=84.2 && t <88.0){hasil2="Pendek";}
else if(t>=88.0 && t <=103.4){hasil2="Normal";}
else if(t>103.4){hasil2="Tinggi";}
}
else if(umur==38){
if(t<84.7){hasil2="Sangat Pendek";}
else if(t>=84.7 && t <88.6){hasil2="Pendek";}
else if(t>=88.6 && t <=104.2){hasil2="Normal";}
else if(t>104.2){hasil2="Tinggi";}
}
else if(umur==39){
if(t<85.3){hasil2="Sangat Pendek";}
else if(t>=85.3 && t <89.2){hasil2="Pendek";}
else if(t>=89.2 && t <=105.0){hasil2="Normal";}
else if(t>105.0){hasil2="Tinggi";}
}
else if(umur==40){
if(t<85.8){hasil2="Sangat Pendek";}
else if(t>=85.8 && t <89.8){hasil2="Pendek";}
else if(t>=89.8 && t <=105.7){hasil2="Normal";}
else if(t>105.7){hasil2="Tinggi";}
}
else if(umur==41){
if(t<86.3){hasil2="Sangat Pendek";}
else if(t>=86.3 && t <90.4){hasil2="Pendek";}
else if(t>=90.4 && t <=106.4){hasil2="Normal";}
else if(t>106.4){hasil2="Tinggi";}
}
else if(umur==42){
if(t<86.8){hasil2="Sangat Pendek";}
else if(t>=86.8 && t <90.9){hasil2="Pendek";}
else if(t>=90.9 && t <=107.2){hasil2="Normal";}
else if(t>107.2){hasil2="Tinggi";}
}
else if(umur==43){
if(t<87.4){hasil2="Sangat Pendek";}
else if(t>=87.4 && t <91.5){hasil2="Pendek";}
else if(t>=91.5 && t <=107.9){hasil2="Normal";}
else if(t>107.9){hasil2="Tinggi";}
}
else if(umur==44){
if(t<87.9){hasil2="Sangat Pendek";}
else if(t>=87.9 && t <92.0){hasil2="Pendek";}
else if(t>=92.0 && t <=108.6){hasil2="Normal";}
else if(t>108.6){hasil2="Tinggi";}
}
else if(umur==45){
if(t<88.4){hasil2="Sangat Pendek";}
else if(t>=88.4 && t <92.5){hasil2="Pendek";}
else if(t>=92.5 && t <=109.3){hasil2="Normal";}
else if(t>109.3){hasil2="Tinggi";}
}
else if(umur==46){
if(t<88.9){hasil2="Sangat Pendek";}
else if(t>=88.9 && t <93.1){hasil2="Pendek";}
else if(t>=93.1 && t <=110.0){hasil2="Normal";}
else if(t>110.0){hasil2="Tinggi";}
}
else if(umur==47){
if(t<89.3){hasil2="Sangat Pendek";}
else if(t>=89.3 && t <93.6){hasil2="Pendek";}
else if(t>=93.6 && t <=110.7){hasil2="Normal";}
else if(t>110.7){hasil2="Tinggi";}
}
else if(umur==48){
if(t<89.8){hasil2="Sangat Pendek";}
else if(t>=89.8 && t <94.1){hasil2="Pendek";}
else if(t>=94.1 && t <=111.3){hasil2="Normal";}
else if(t>111.3){hasil2="Tinggi";}
}
else if(umur==49){
if(t<90.3){hasil2="Sangat Pendek";}
else if(t>=90.3 && t <94.6){hasil2="Pendek";}
else if(t>=94.6 && t <=112.0){hasil2="Normal";}
else if(t>112.0){hasil2="Tinggi";}
}
else if(umur==50){
if(t<90.7){hasil2="Sangat Pendek";}
else if(t>=90.7 && t <90.7){hasil2="Pendek";}
else if(t>=95.1 && t <=112.7){hasil2="Normal";}
else if(t>112.7){hasil2="Tinggi";}
}
else if(umur==51){
if(t<91.2){hasil2="Sangat Pendek";}
else if(t>=91.2 && t <95.6){hasil2="Pendek";}
else if(t>=95.6 && t <=113.3){hasil2="Normal";}
else if(t>113.3){hasil2="Tinggi";}
}
else if(umur==52){
if(t<91.7){hasil2="Sangat Pendek";}
else if(t>=91.7 && t <96.1){hasil2="Pendek";}
else if(t>=96.1 && t <=114.0){hasil2="Normal";}
else if(t>114.0){hasil2="Tinggi";}
}
else if(umur==53){
if(t<92.1){hasil2="Sangat Pendek";}
else if(t>=92.1 && t <96.6){hasil2="Pendek";}
else if(t>=96.6 && t <=114.6){hasil2="Normal";}
else if(t>114.6){hasil2="Tinggi";}
}
else if(umur==54){
if(t<92.6){hasil2="Sangat Pendek";}
else if(t>=92.6 && t <97.1){hasil2="Pendek";}
else if(t>=97.1 && t <=115.2){hasil2="Normal";}
else if(t>115.2){hasil2="Tinggi";}
}
else if(umur==55){
if(t<93.0){hasil2="Sangat Pendek";}
else if(t>=93.0 && t <97.6){hasil2="Pendek";}
else if(t>=97.6 && t <=115.9){hasil2="Normal";}
else if(t>115.9){hasil2="Tinggi";}
}
else if(umur==56){
if(t<93.4){hasil2="Sangat Pendek";}
else if(t>=93.4 && t <98.1){hasil2="Pendek";}
else if(t>=98.1 && t <=116.5){hasil2="Normal";}
else if(t>116.5){hasil2="Tinggi";}
}
else if(umur==57){
if(t<93.9){hasil2="Sangat Pendek";}
else if(t>=93.9 && t <98.5){hasil2="Pendek";}
else if(t>=98.5 && t <=117.1){hasil2="Normal";}
else if(t>117.1){hasil2="Tinggi";}
}
else if(umur==58){
if(t<94.3){hasil2="Sangat Pendek";}
else if(t>=94.3 && t <99.0){hasil2="Pendek";}
else if(t>=99.0 && t <=117.7){hasil2="Normal";}
else if(t>117.7){hasil2="Tinggi";}
}
else if(umur==59){
if(t<94.7){hasil2="Sangat Pendek";}
else if(t>=94.7 && t <99.5){hasil2="Pendek";}
else if(t>=99.5 && t <=118.3){hasil2="Normal";}
else if(t>118.3){hasil2="Tinggi";}
}
else if(umur==60){
if(t<95.2){hasil2="Sangat Pendek";}
else if(t>=95.2 && t <99.9){hasil2="Pendek";}
else if(t>=99.9 && t <=118.9){hasil2="Normal";}
else if(t>118.9){hasil2="Tinggi";}
}
}
//==============================================
Hasilnya=hasil+", dan:"+hasil2;
String saran1="";
if(hasil.equalsIgnoreCase("Gizi Buruk")){saran1="banyak makan Sayuran";}
else if(hasil.equalsIgnoreCase("Gizi Kurang")){saran1="banyak makan Sayuran";}
else {saran1="banyak makan Sayuran";}
String saran2="";
if(hasil2.equalsIgnoreCase("Sangat Pendek")){saran2="banyak makan buah";}
else if(hasil2.equalsIgnoreCase("Pendek")){saran2="banyak makan buah";}
else {saran2="banyak makan buah";}
Sarannya = saran1+", dan "+saran2;
Intent put = new Intent(getBaseContext(), Output.class);
put.putExtra("bb", txtBB.getText().toString());
put.putExtra("tb", txtTB.getText().toString());
put.putExtra("saran1",Sarannya);
put.putExtra("hasil1",Hasilnya);
put.putExtra("id",id);
put.putExtra("nama", nama);
put.putExtra("ortu", ortu);
put.putExtra("usia", txtUsia.getText().toString());
put.putExtra("tgl", txtTglTimbang.getText().toString());
startActivity(put);
finish();
}
}
});
}
public void pesan(String ps){
new AlertDialog.Builder(this)
.setTitle("Hitung Gizi")
.setMessage(ps)
.setNeutralButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dlg, int sumthin) {
}})
.show();
}
// public void simpanYNi(){
// AlertDialog.Builder ad=new AlertDialog.Builder(hitunggizi.this);
// ad.setTitle("Konfirmasi");
// ad.setMessage("Apakah benar simpan data?");
//
// ad.setPositiveButton("OK",new OnClickListener(){
// public void onClick(DialogInterface dialog, int which) {
//
// String hs=txtHasil.getText().toString();
// hs=hs.replaceAll("Tinggi Berdasarkan Usia", "TBU");
// hs=hs.replaceAll("Berat Berdasarkan Jenis kelamin dan usia", "BBU");
// //Usia:5|Tinggi Berdasarkan Usia:Gizi Kurang, Berat Berdasarkan Jenis kelamin dan usia:Sangat Pendek
// helper.inserttimbang(id, txtTglTimbang.getText().toString() ,txtBB.getText().toString(),txtTB.getText().toString(),"Usia:"+txtUsia.getText()+" bln#"+hs);
// Log.v("HASIL",id+"="+ txtTglTimbang.getText().toString() +"="+txtBB.getText().toString()+"="+txtTB.getText().toString()+"="+"Usia:"+txtUsia.getText()+"#"+hs);
//
// Intent put = new Intent(getBaseContext(), listdataTimbang.class);///
// put.putExtra("id", id);
// put.putExtra("nama", nama);
// put.putExtra("ortu", ortu);
// put.putExtra("tgllahir", tgllahir);
// put.putExtra("jk", jk);
// put.putExtra("ket", ket);
// startActivity(put);
// finish();
// }});
//
// ad.setNegativeButton("No",new OnClickListener(){
// public void onClick(DialogInterface arg0, int arg1) {
// }});
//
// ad.show();
// }
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
finish();
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
Oh lelahnya ngetik.........eh copas.....
Tidak ada komentar:
Posting Komentar