Created
December 30, 2011 21:29
-
-
Save anonymous/1541551 to your computer and use it in GitHub Desktop.
aplikasi penghitung gizi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <conio.h> | |
//thanks bgd om qball006,om ditatompel :D | |
using namespace std; | |
void main() | |
{ | |
int BB; | |
char ulangi; | |
float TB,IMT; | |
do | |
{ | |
cout << "CitooZz_Banditozz@klikedukasi.com"<<endl; | |
cout << "================================="<<endl; | |
cout << "================================="<<endl; | |
cout << "Masukan berat badan anda (kg)" <<endl; | |
cin >>BB; | |
cout << "Masukan tinggi badan anda (m)" <<endl; | |
cin >>TB; | |
IMT = BB/(TB*TB); | |
cout <<"IMT="<<IMT<<endl; | |
if (IMT < 17) | |
cout << "Anda termasuk status gizi buruk (Sangat Kurus)" <<endl; | |
else if ((IMT >= 17) && (IMT <= 18.5)) | |
cout << "Anda termasuk status gizi kurang (Kurus)" <<endl; | |
else if ((IMT >= 18.6) && (IMT <= 25)) | |
cout << "Anda termasuk status gizi baik (Normal)" <<endl; | |
else if ((IMT >= 25.1) && (IMT <= 27)) | |
cout << "Anda termasuk status gizi lebih (Gemuk)" <<endl; | |
else | |
cout << "Anda termasuk status obesitas (Sangat gemuk)" <<endl; | |
getch(); | |
cout<<"apakah anda ingin megulanginya[y/t]:"; | |
cin>>ulangi; | |
} | |
while (ulangi=='y'||ulangi=='Y'); | |
getche (); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment