Advertisement
Guest User

Untitled

a guest
Feb 20th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. char tekst[256];
  9. cout<<"Podaj tekst do wpisania: ";
  10. cin.getline(tekst,256);
  11. int x=strlen(tekst);
  12. int i;
  13.  
  14. for(i=0;i<x;i+=2){
  15. cout<<tekst[i]<<tekst[i+1]<<" ";
  16. }
  17.  
  18.  
  19. system("PAUSE");
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement