#include <iostream>
using namespace std;
int main() {
char str[] = "werethisfrom";
int i;
int k = 0;
for (i = 0; i < strlen(str); i++) {
cout << str[i];
k++;
if (k == 4) {
k = 0;
cout << endl;
}
return 0;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
using namespace std;
int main() {
char str[] = "werethisfrom";
int i;
int k = 0;
for (i = 0; i < strlen(str); i++) {
cout << str[i];
k++;
if (k == 4) {
k = 0;
cout << endl;
}
}
return 0;
}