githubNonFunziona/2-3-e.spp

31 lines
603 B
Plaintext
Raw Permalink Normal View History

2024-12-05 10:57:14 +00:00
#include <iostream>
#include <string>
int main()
{
int a, b;
std::cin >> a >> b;
int e = a;
std::cout.width(a);
for(int k = 1; k < a; k++) {
std::cout <<" ";
if (a >= 3 && k == 1){
std::cout <<" ";
}
else if(a < 3){
std::cout <<" ";
}
}
for(int i = 1; i <= b; i++) {
std::cout.width(3);
std::cout << i;
if (e == 7){
std::cout << "\n";
e = 1;
}
else{
e++;
}
}
}