Advertisement
Guest User

Zad 1

a guest
Mar 30th, 2017
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <conio.h>
  4.  
  5. using namespace std;
  6. int main(){
  7. string imie, nazwisko,x;
  8. double c,d,a;
  9.  
  10. cout<<"nazwisko wprowadz se\n";
  11. cin>>nazwisko;
  12. cout<<"imiese tez wprowadz\n";
  13. cin>>imie;
  14. c=imie.length()+nazwisko.length();
  15. d=imie.length();
  16. cout<<d/c<<endl;
  17. a=nazwisko.size();
  18. x=imie[(imie).size() -2];
  19. nazwisko.erase(a-2,1);
  20. cout<<nazwisko.insert(a-2,x);
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement