2 5 10 17
5 8 13 20
10 13 18 25
17 20 25 32

Reverend Jim commented: This is bad on so many levels. -3

Recommended Answers

I think what he's saying is that he has a homework assignment where you need to write code that outputs that pattern.

Can you please show the code you have so far, where you're stuck, and what errors you're getting? Then we can help you.

Jump to Post

I see no mention of a pattern.

For each row, First number +3 to get second, Second number + 5 to get third, Third number + 7 to get fourth
For each column, First number + 3 to get second, Second number + 5 to get third, Third …

Jump to Post

All 5 Replies

Have to write you didn't put any effort into your question. So little effort I can't tell what your question is!

I think what he's saying is that he has a homework assignment where you need to write code that outputs that pattern.

Can you please show the code you have so far, where you're stuck, and what errors you're getting? Then we can help you.

commented: I see no mention of a pattern. But 4 lines of printf() and done given the specs so far. +0

I see no mention of a pattern.

For each row, First number +3 to get second, Second number + 5 to get third, Third number + 7 to get fourth
For each column, First number + 3 to get second, Second number + 5 to get third, Third number + 7 to get fourth

The assignment probably calls for nested for loops.

commented: How would anyone here know this? +0

How would anyone here know this?

Because it's a commonly seen project for first year computer science students.

It just dawned on me that you might be the professor of this class. Is there a link to this assignment for me to look at?

PS. Let's hope OP or an assignment detail shows up.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.