joysro

game12
Kayıt
28 Temmuz 2012
Mesajlar
1.674
Beğeniler
207
Şehir
nWo ~
jado
Kod:
#include <iostream>
// İdeal kilo hesaplama || Programa cinsiyet / boy / agırlık / erkek ideal = 50+2.3*(boy / 2.54 - 60) || kadın ideal = 45.5 + 2.3 * (boy /2.54-60)
using namespace std;

int main () {
   
    double boy,agirlik;
    int x,idealk,x2;
    char cinsiyet;
    cout<<"|----------------------------------------------|"<<endl;
    cout<<"|         Ideal Kilo Hesaplama Programi        |"<<endl;
    cout<<"|----------------------------------------------|"<<endl;
    cout<<"|-Lutfen cinsiyetinizi (e/k) giriniz: ";
    cin >> cinsiyet;
    cout<<"|----------------------------------------------|"<<endl;
    cout<<"|-Lutfen boyunuzu giriniz: ";
    cin >> boy;
    cout<<"|----------------------------------------------|"<<endl;
    cout<<"|-Lutfen kilonuzu giriniz: ";
    cin >> agirlik;
    cout<<"|----------------------------------------------|"<<endl;
   
    if (cinsiyet=='e'){
        idealk = 50+2.3*(boy/2.54-60);
            cout << "|--Ideal kilonuz: "<<idealk<<"                           |\n";
                if (idealk==agirlik){
                    cout << "|----Tebrikler ideal kilodasiniz!              |"<<endl;
                    cout<<"|----------------------------------------------|"<<endl;
                    cout << "|\n|\n| www.extraloob.com & SilkroadTasarim | "<<endl;   
                    cout<<"|-----------------------------------------------------------\n";
                    system ("pause");
                }
                else{
                    cout << "|--Malesef, ideal kiloda degilsiniz!           |"<<endl;
                    cout<<"|----------------------------------------------|"<<endl;
                    cout << "|\n|\n|-----| www.extraloob.com & SilkroadTasarim | "<<endl;   
                    cout<<"|-----------------------------------------------------------\n";
                    system ("pause"); 
                }
    }

    else if (cinsiyet=='k'){
        idealk = 45.5 + 2.3 * (boy /2.54-60);
            cout << "|--Ideal kilonuz: "<<idealk<<"                           |\n";
                if (idealk==agirlik){
                    cout << "|----Tebrikler ideal kilodasiniz!              |"<<endl;
                    cout<<"|----------------------------------------------|"<<endl;
                    cout << "|\n|\n|-----| www.extraloob.com & SilkroadTasarim | "<<endl;   
                    cout<<"|-----------------------------------------------------------\n";
                    system ("pause");
                }
                else{
                    cout << "|--Malesef, ideal kiloda degilsiniz!           |"<<endl;
                    cout<<"|----------------------------------------------|"<<endl;
                    cout << "|\n|\n|-----| www.extraloob.com & SilkroadTasarim | "<<endl;   
                    cout<<"|-----------------------------------------------------------\n";
                    system ("pause");
                }
    }
}
 
Yukarı Alt