Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- void v(string s, int n = 0){
- if (s[n] != '\0'){
- if (s[n] >= 'a' && s[n] <= 'z' && !(n%2))
- cout <<(char) (s[n] + ('A' - 'a'));
- else
- cout << s[n];
- v(s, n + 1);
- }
- }
- int main(){
- string x;
- getline (cin, x);
- v(x);
- cout << endl;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement