Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <conio.h>
- using namespace std;
- int main(){
- string imie, nazwisko,x;
- double c,d,a;
- cout<<"nazwisko wprowadz se\n";
- cin>>nazwisko;
- cout<<"imiese tez wprowadz\n";
- cin>>imie;
- c=imie.length()+nazwisko.length();
- d=imie.length();
- cout<<d/c<<endl;
- a=nazwisko.size();
- x=imie[(imie).size() -2];
- nazwisko.erase(a-2,1);
- cout<<nazwisko.insert(a-2,x);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement