Advertisement
GarikK

real_ass

Sep 3rd, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. using namespace std;
  4. string asd(char input[]);
  5.  
  6.  
  7. int main()
  8. {
  9.  
  10.  
  11. char input[] = "SOSSSRRRQQQ";
  12. for (int i = 2; i < sizeof(input) / sizeof(input[0]); i++) {
  13. cout << input[i];
  14. }
  15. string a = asd(input);
  16.  
  17. cout << asd(input);
  18.  
  19. return 0;
  20. }
  21. string asd(char input[]) {
  22. string ass = "";
  23. int a = strlen(input);
  24. for (int i = 3; i < a; i++) {
  25. if (input[i] == '\0')
  26. break;
  27. ass += input[i];
  28. }
  29. return ass;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement