P
PR
PRO
PROG
PROGR
PROGRA
PROGRAM
ROGRAM
OGRAM
GRAM
RAM
AM
M

All too easy. Tested and passed at https://www.w3schools.com/cpp/

#include <iostream>
using namespace std;

int main() {
  cout << "P\r\nPR\r\nPRO\r\nPROG\r\nPROGR\r\nPROGRA\r\nPROGRAM\r\nROGRAM\r\nOGRAM\r\nGRAM\r\nRAM\r\nAM\r\nM";
  return 0;
}
commented: Congratulations, Captain Obvious. +15
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.