12345678910111213141516171819202122232425262728293031
#include <iostream> using namespace std; char text[]={"Hi friends, good morning."}; char temp; int i; int j; int main() { for(i=0;i<sizeof(texto)/3;i+=1) { temp=text[3i]; text[3i]=text[3i+1]; text[3i+1]=text[3i+2] text[3i+2]=temp; cout << text[3i+1] << text[3i+2] << text [3i]; } if(sizeof(text)%3!=0) { for(int j=0; j<sizeof(text)%3;j++) { cout << text[3i+j]; } } system("PAUSE"); return EXIT_SUCCESS; }
for(i=0;i<sizeof(texto)/3;i+=1)