Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include <iostream>
  2. #include <cctype>
  3.  
  4. using namespace std;
  5. //Mateusz Wrzyszcz
  6.  
  7. int funkcja(char *tab )
  8. {
  9.  
  10. for(int i = 0; i<10; i++, *tab++)
  11. {
  12. if(tab[i]=='0')
  13. {
  14. *tab = toupper(*tab);
  15. }
  16. else
  17. return 0;
  18. }
  19. }
  20.  
  21.  
  22.  
  23. int main() {
  24.  
  25. char tab[10] = {'a', '$', 'c', 'd', 'a', 'b', '0', 'g', 'h', 'u'};
  26.  
  27.  
  28. funkcja(tab);
  29.  
  30. for(int i=0; i<10; i++)
  31. {
  32. cout<<tab[i]<< " ";
  33. }
  34.  
  35. return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement