A program for

A
BC
DEF
GHIJ
KLMNO

Use two loops, one nested inside the other. The outermost loop counts rows (1-5) and the inner loop counts from 0 to the value of the outer loop.

A program for

A
BC
DEF
GHIJ
KLMNO

That's kind of weird, but okay:

#include <iostream>

using namespace std;

int main()
{
    cout << "A\nBC\nDEF\nGHIJ\nKLMNO\n";
}

p.s. We're not your coding slaves. Posting your homework without even a please or thank you again will find it deleted. Please read our rules.

Be a part of the DaniWeb community

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