1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
|
#include <cstdlib>
#include <iostream>
using namespace std;
int a();
int b();
int c();
//meniu
int main (void)
{
//pristatymas
cout << " Si programa skaiciuoja apytikslia suma , kad lengviau butu pirkti is Ebay, " << endl;
cout << " Steam ar kitu komerciniu korporaciju " << endl;
cout << " ,delto, kad valiutu kursas keiciasi! " << endl;
cout << endl;
cout << endl;
//pristatymas
// pasirinktys
char ch;
cout <<"Pasirinkite viena varianta is a > Litas-Euras,b > Litas-Doleris,c > Litas-Svaras"<<endl;
cout <<"noredami nutraukti darba iveskite #"<<endl;
while ((ch=getchar())!='#')
{
if(ch!=' ')
switch(ch)
{
case 'a':cout << "Euras-Litas\n" << endl;cout << a();
break;
case 'b':cout << "Doleris-Litas\n" << endl;cout << b();
break;
case 'c':cout << "Svaras-Litas\n" << endl;;cout << c();
break;
}
else
cout << "Jus ivedete tarpo klavisa, noredami testi iveskite raide , arba noredami baigti #\n"<<endl;
}
}
// pasirinktys
//meniu
//Euro skaiciavimas
int a()
{
double a,b,c;
c=3.5;
cout << "Irasyktite euru suma\n" << endl;
cin >> a;
cout << endl;
b=a*c ;
cout << a << endl;
cout << "euru sudaro" <<endl;
cout << b << endl;
cout << "litu" << endl;
cout << endl;
cout << endl;
cout << endl;
return 0 ;
}
//Euro skaiciavimas
//Dolerio skaiciavimas
int b()
{
double a,b,c;
c=2.3;
cout << "Irasyktite doleriu suma\n" << endl;
cin >> a;
cout << endl;
b=a*c ;
cout << a << endl;
cout << "doleriu sudaro" <<endl;
cout << b << endl;
cout << "litu" << endl;
cout << endl;
cout << endl;
cout << endl;
return 0 ;
}
//Dolerio skaiciavimas
//Svaro skaiciavimas
int c()
{
double a,b,c;
c=4.5;
cout << "Irasyktite svaru suma\n" << endl;
cin >> a;
cout << endl;
b=a*c ;
cout << a << endl;
cout << "svaru sudaro" <<endl;
cout << b << endl;
cout << "litu" << endl;
cout << endl;
cout << endl;
cout << endl;
return 0 ;
}
//Svaro skaiciavimas
|