#Couldn't figure out how to work on a project

21 messages · Page 1 of 1 (latest)

waxen gyroBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

tawdry folio
#

Where is your code?

fair rover
tawdry folio
#

No you can add your code now

#

Its not a problem

fair rover
tawdry folio
#

just send it as a message here do not bother adding it to the thread

fair rover
tawdry folio
#

use the implemented discord feature for sharing codes

#

google it if you don't know how

waxen gyroBOT
#
How to Format Code on Discord
Markup

```c
int main() {}
```

Result
int main() {}
winged epoch
#

But if it's all in main(), then I am guessing that it will be one very, very long and complex main().
There is a limit to how long any one post may be, so you will find it difficult to chunk it up here.

Suggest you paste the code into godbolt.org and share a link to it here.

#

But do try it here first.

fair rover
# tawdry folio use the implemented discord feature for sharing codes
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
    const int size = 7; // Table size
    const int width = 4; // Width of each cell
    for(int i=1;i<=12;i++){
        cout<<i<<endl;
        // Print column headers
        cout << setw(width) << " ";
        for (int col = 1; col <= size; ++col) {
            cout << "|" << setw(width) << col;
        }
        cout << endl;

        // Print line separator
        cout << setw(width) << " ";
        for (int col = 1; col <= size; ++col) {
            cout << "+" << setw(width) << setfill('-') << "----";
        }
        cout << setfill(' ') << endl;

        // Print table rows
        for (int row = 1; row <= size; ++row) {
            // Print row header
            cout << setw(width) << row;

            // Print row values
            for (int col = 1; col <= size; ++col) {
                cout << "|" << setw(width) << row * col;
            }
            cout << endl;

            // Print line separator
            if (row != size) {
                cout << setw(width) << " ";
                for (int col = 1; col <= size; ++col) {
                    cout << "+" << setw(width) << setfill('-') << "----";
                }
                cout << setfill(' ') << endl;
            }
        }
        cout<<endl;
    }
    return 0;
}


fair rover
winged epoch
#

Whoah, ehr... that's C++ code.

#

Didn't clock you mentioned "#include<iostream> and <iomanip>".

fair rover
#

did i mess up? im new here

#

sorry 😦

winged epoch
#

This should really be posted in #1013107104678162544

fair rover
#

dang it. it's a little to complex for me. ima delete it. im so sorry