-1

I'm new to C++ and can't figure out why my console won't stay open during execution. I'm just tinkering around, but feel free to crucify bad habits. Please help:

#include <stdio.h>
#include <conio.h>

int main()
{
    printf("quantity\tCost\tTotal\n");
    printf("\a\a\a\a\aSkip a few lines, and beep ");
    printf("%s %c.", "You are kicking butt learning", 'C');

    getche();

    return 0;
}
JoriO
  • 1,050
  • 6
  • 13

1 Answers1

0

Use system("pause"); which displays a message press any key to continue... and waits for you.

RE60K
  • 621
  • 1
  • 7
  • 26