0
Hiđ€đ€ how can make this figure by using loop
******** ******** ******** ********
3 RĂ©ponses
+ 17
#include <iostream>
using namespace std;
int main() {
for (int stp = 0; stp <= 4; stp++) {
if (stp%2==0) {
cout<<"********"<<endl;
} else {
cout<<" ********"<<endl;
}
}
return 0;
}
+ 7
// just adding another sample
#include <iostream>
using namespace std;
int main() {
for (int stp = 0; stp < 4; stp++) {
if (stp%2!=0) cout << " ";
cout<<"********"<<endl;
}
}
return 0;
}
0
thank you đđ