hello i want to create a C++ program in this view
1
2
3
4
5
6
7
8
9

does that mean you want to have line numbering or is that supposed to be your output

cout<<"\n 1";
cout<<" \n 2 ";
and so on..i think so..the next line?

I know it is homework and you didn't post what you have but its really simple and if you don't know how to start this then I wouldn't really expect any work done already.

#include <iostream>
using namespace std;

int main()
{
    for( int i = 1; i < 10; i++ )
    {
        cout << i << endl;
    }
    //add a pause here if you need to
    return 0;
}
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.