- 1

Write C++ program to print the numbers from 1 to 36 each 4 on one line (nested for loop)

I tried to solve but I didn't

12th Jun 2021, 8:42 PM
Amjed Alogaidi
Amjed Alogaidi - avatar
3 Respostas
+ 4
Hi! Please, show us your code attempt! Thx!
12th Jun 2021, 8:43 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
The answer int i,j,m=0; for(i=1;i<=9;i++) { for(j=1;j<=4;j++) { m++; cout<<m<<" "; } cout<<endl; }
14th Oct 2021, 2:15 PM
Amjed Alogaidi
Amjed Alogaidi - avatar
0
#include <iostream> using namespace std; int main() { int n=1; for (int i=1;i<=9;i++) { for (int j=1;j<=4;j++) { cout<<n; n++; } cout<<endl; } return 0; }
10th Jul 2023, 8:30 PM
Amjed Alogaidi
Amjed Alogaidi - avatar