cpp

cpp

pavlo marushchyk

#include <iostream>

using namespace std;

int main()

{

int cal;

float resz;

float pp;

 cout<<"wprowadz liczbe:";

 cin>>pp;

 cal = pp;

 cout<<"liczba całkowita to:";

 cout<<cal;

 resz = pp-cal;

 cout<<"reszta to:"<<endl;

 cout<<resz;

 return 0;

}

#include <iostream>


using namespace std;


int main()

{

string pp;

float eu;

float pl;

cout<<"Podaj walute którą chcesz obliczć:"<<endl;

cout<<"wpisz eu dla euro oraz pl dla złotego"<<endl;

cout<<"Waluta:";

cin>>pp;

if(pp=="eu"){

  cout<<"Wybrałeś euro"<<endl;

  cout<<"podaj ilość euro:";

  cin>>eu;

  pl = eu * 4.67;

  cout<<"To jest tyle złotych:"<<endl;

  cout<<pl;

}

else{

  cout<<"Wybrałeś Złoty"<<endl;

  cout<<"podaj ilość złotych:";

  cin>>pl;

  eu = pl/4.67;

  cout<<"To jest tyle euro:"<<endl;

  cout<<eu;

}

 return 0;

}

Report Page