28/11/2008, 13:08
Frank, Yen, Euro veya Dolar' ı YTL' ye çeviren program
#include <iostream.h>
int main()
{
double dolarKuru;
double YTL;
double dolarMiktari;
double yenKuru;
double frankKuru;
double euroKuru;
double euroMiktari;
double frankMiktari;
double yenMiktari;
char tur;
int programSonu;
cout << "*Program Surumu: 002*\n";
cout << " \n";
cout << " DOVIZMATiK\n";
cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";
cout << " \n";
cout << " --Yigitcan SUMBELLi--\n";
cout <<" \n";
cout <<" \n";
cout << "Lutfen istediginiz doviz turunu secin:\n";
cout << "a - Euro\n";
cout << "b - Dolar\n";
cout << "c - Frank\n";
cout << "d - Yen\n";
cout << " \n";
cin >> tur;
if (tur == 'a')
{
cout << endl;
cout << " \n";
cout << "Lutfen bugunku euro kur'unu giriniz: \n";
cout << " \n";
cin >> euroKuru;
cout << endl;
cout << "Lutfen YTL miktarini giriniz:\n";
cin >> YTL;
cout << endl;
euroMiktari = YTL / euroKuru;
cout << YTL << "YTL ile alabileceginiz euro miktari: " << euroMiktari;
}
else if(tur == 'b')
{
cout << "Lutfen bugunku dolar kur'unu giriniz: \n";
cout << " \n";
cin >> dolarKuru;
cout << endl;
cout << "Lutfen YTL miktarini giriniz:\n";
cin >> YTL;
cout << endl;
dolarMiktari = YTL / dolarKuru;
cout << "YTL << YTL ile alabileceginiz dolar miktari: " << dolarMiktari;
}
else if (tur == 'c')
{
cout << "Lutfen bugunku frank kur'unu giriniz: \n";
cout << " \n";
cin >> frankKuru;
cout << endl;
cout << "Lutfen YTL miktarini giriniz:\n";
cin >> YTL;
cout << endl;
frankMiktari = YTL / frankKuru;
cout << "YTL << YTL ile alabileceginiz frank miktari: " << frankMiktari;
}
else if (tur == 'd')
{
cout << "Lutfen bugunku yen kur'unu giriniz: \n";
cout << " \n";
cin >> yenKuru;
cout << endl;
cout << "Lutfen YTL miktarini giriniz:\n";
cin >> YTL;
cout << endl;
yenMiktari = YTL / yenKuru;
cout << "YTL << YTL ile alabileceginiz yen miktari: " << yenMiktari;
}
else
{
cout << "Programda boyle bir doviz turu bulunmamaktadir...\n";
}
cout << " \n";
cout << " \n";
cout << "Lutfen bir tusa basip enter'layin ve programi sonlandirin...\n";
cin >> programSonu;
return 0;
}
#include <iostream.h>
int main()
{
double dolarKuru;
double YTL;
double dolarMiktari;
double yenKuru;
double frankKuru;
double euroKuru;
double euroMiktari;
double frankMiktari;
double yenMiktari;
char tur;
int programSonu;
cout << "*Program Surumu: 002*\n";
cout << " \n";
cout << " DOVIZMATiK\n";
cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";
cout << " \n";
cout << " --Yigitcan SUMBELLi--\n";
cout <<" \n";
cout <<" \n";
cout << "Lutfen istediginiz doviz turunu secin:\n";
cout << "a - Euro\n";
cout << "b - Dolar\n";
cout << "c - Frank\n";
cout << "d - Yen\n";
cout << " \n";
cin >> tur;
if (tur == 'a')
{
cout << endl;
cout << " \n";
cout << "Lutfen bugunku euro kur'unu giriniz: \n";
cout << " \n";
cin >> euroKuru;
cout << endl;
cout << "Lutfen YTL miktarini giriniz:\n";
cin >> YTL;
cout << endl;
euroMiktari = YTL / euroKuru;
cout << YTL << "YTL ile alabileceginiz euro miktari: " << euroMiktari;
}
else if(tur == 'b')
{
cout << "Lutfen bugunku dolar kur'unu giriniz: \n";
cout << " \n";
cin >> dolarKuru;
cout << endl;
cout << "Lutfen YTL miktarini giriniz:\n";
cin >> YTL;
cout << endl;
dolarMiktari = YTL / dolarKuru;
cout << "YTL << YTL ile alabileceginiz dolar miktari: " << dolarMiktari;
}
else if (tur == 'c')
{
cout << "Lutfen bugunku frank kur'unu giriniz: \n";
cout << " \n";
cin >> frankKuru;
cout << endl;
cout << "Lutfen YTL miktarini giriniz:\n";
cin >> YTL;
cout << endl;
frankMiktari = YTL / frankKuru;
cout << "YTL << YTL ile alabileceginiz frank miktari: " << frankMiktari;
}
else if (tur == 'd')
{
cout << "Lutfen bugunku yen kur'unu giriniz: \n";
cout << " \n";
cin >> yenKuru;
cout << endl;
cout << "Lutfen YTL miktarini giriniz:\n";
cin >> YTL;
cout << endl;
yenMiktari = YTL / yenKuru;
cout << "YTL << YTL ile alabileceginiz yen miktari: " << yenMiktari;
}
else
{
cout << "Programda boyle bir doviz turu bulunmamaktadir...\n";
}
cout << " \n";
cout << " \n";
cout << "Lutfen bir tusa basip enter'layin ve programi sonlandirin...\n";
cin >> programSonu;
return 0;
}