Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
a=[{fprintf('Hare '},{'KrishnaKrishna'},{'RamaHare'}];forKrishna\nKrishnai=2:3,fprintf('%s%s%s%s\n%s%s%s%s\n',a{1},a{i},a{1},a{i},a{i},a{i},a{1},a{1})
end
fprintf('\b')Krishna HareHare\nHare Rama Hare Rama\nRamaRama Hare Hare')
Standard formatting; we usually leave old byte counts, but remove old code - you can check edit history to find old code. You can roll back if you like, it's not too crucical.