Quick actions

cmd+k|ctrl+k

Navigation

Languages

Reverse A String

Snippet info

Language

Cpp

Visibility

public

Author

amangoyal1727

Created

2020-11-29T13:26:34Z

Updated

2020-11-29T13:27:11Z

#include <iostream>
using namespace std;

int main() {
    
    char x[10];
    for(int i=0 ; i<10 ; i++){
        cin>>x[i];
    }
    
    char y[10];
    int j =0;
    for(int q=9;q>=0;q--){
        y[j]=x[q];
        j++;
    }
    
    
    for(int j=0 ; j<10;j++){
        cout<<y[j];
    }
    
    
}
INFO