a) Write a loop to print all numbers from 1 to 100, one per line, Write a blank line after every five lines. [10]

Recommended Answers

What do you have so far?

Jump to Post

All 3 Replies

please help me guys ,its my first assignment in c++

What do you have so far?

We don't provide code. If you have any problems post your code and people will help you. But for now and your start point and for the last time:

for(int iIndex = 1; iIndex<=100; iIndex++)
    cout << iIndex << endl;
    if( iIndex%5==0 ) 
        cout << endl;
commented: "We don't provide code" -- then provides code. -2
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.