Jumat, 15 April 2011

aplikasi psldv buatan sendiri

awalnya cuma ingin buat aplikasi biar adek kalau belajar nggak kesusahan, ternyata hasilnya membanggakan. dengan sedikin pengetahuan tentang c++, alhamdulillah saya berhasil membuat aplikasi yang sangat sederhana ini.

anda bisa membantu mengembangkannya. berikut ini sourcenya


#include

using namespace std;

int main()
{
        for(;;){
        cout<<"welcome to my program"<
            <<"this program can find the value"<
            <<"of x and y from this equation"<
            <<"=========================="<
            <<"       ax + by = c "<
            <<"       mx + nx = o "<
            <<<"based on above equation, enter this variables"<
            double a, x, y, n, c, m, b, o;
            cout<<<"enter value for a variable = ";
            cin>>a;
            cout<<<"enter value for b variable = ";
            cin>>b;
            cout<<<"enter value for c variable = ";
            cin>>c;
            cout<<<<"that is the first one. now, the last one :"<
            cout<<<"enter value for m variable = ";
            cin>>m;
            cout<<<"enter value for n variable = ";
            cin>>n;
            cout<<<"enter value for o variable = ";
            cin>>o;
            class var
                {
                    public:
                    double jumlah;
                    double up;
                    double down;
                };
            var sukudua;
            sukudua.up = b * m;
            sukudua.down = a * n;
            sukudua.jumlah = sukudua.up - sukudua.down;
            var equ;
            equ.up = c * m;
            equ.down = o * a;
            equ.jumlah = equ.up - equ.down;
            y = equ.jumlah / sukudua.jumlah;
            var equx;
            equx.jumlah = c - (b * y);
            x = equx.jumlah / a;
            cout<<"hasil x = "<<
            cout<<"hasil y = "<<
            cout<<"calc again? y/n ";
            char z;
            cin>>z;
            if (z == 'n')break;
            system("cls");
            }
cout<<<<"thank you for using my software"<
    <<"visit www.xp-ku.blogspot.com"<
    <<"special thanks to :"<
    <<"1. god"<
    <<"2. my parent"<
    <<"3. my friends"<
    <<"4. my private motivator :D"<
system("pause");
}


anda dapat mengcompilenya dengan gcc-g++, mingw, atau yang lain. semoga bermanfaat!!!

Posting Komentar

Give Ur eXPerience about this eXPerience...

Ads