nord vpnnord vpn
Ad

Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
421 B
1
Indexable
Never
#include <bits/stdc++.h>
using namespace std;

int main() {
    string s = "aAbBcCdD";
    string s1;
    
    for(int i = 0; i< s.size(); i++){
        if(isupper(s[i])){
            s1.push_back(char(tolower(s[i])));
        }
        else{
            s1.push_back(char(toupper(s[i])));
        }
    }\
    cout<<"Original string was "<<s<<endl<<"NOW is ";
    for(auto x: s1){
        cout<<x;
    }

    return 0;
}

nord vpnnord vpn
Ad