Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. #include <stdio.h>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. char imie[20], nazwisko[20];
  10. int dlugosc;
  11. cout<<"podaj imie:";
  12. cin>>imie;
  13. cout<<"podaj nazwisko:";
  14. cin>>nazwisko;
  15. strcat(imie," ");
  16. strcat(imie,nazwisko);
  17. cout<<"Nazywasz sie:"<<imie<<endl;
  18. dlugosc=strlen(imie);
  19. cout<<"imie i nazwisko sklada sie z "<<dlugosc<<" znakow";
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement