No older revisions available
No older revisions available
~cpp #include <iostream> #include <cstdlib> using namespace std; char str[3][48]={"1234567890-=WERTYUIOP[]\\SDFGHJKL;'XCVBNM,./","`1234567890-QWERTYUIOP[]ASDFGHJKL;ZXCVBNM,."}; char input[255]; int i, j; void changeStr() { for(i=0; i<strlen(input); i++) { for(j=0; j<47; j++) { if(input[i]==str[0][j]) input[i]=str[1][j]; } } cout << input << endl; } int main() { while(cin.getline(input, 255)) changeStr(); return 0; }