?
Solved

loops

Posted on 1998-12-13
2
Medium Priority
?
228 Views
Last Modified: 2010-04-02
I have a for loop to output a table
for(int i=0;i<=table;i++)

now I want to stop if i=12 and print out some data

then continue for rest of the count of i.

thanks for the help.
0
Comment
Question by:strmtrpr
2 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 80 total points
ID: 1180046
for (int i=0;i<=table;i++)
{
     if (i == 12)
        cout << "i == 12!";
    // other stuff
}

let me know if you have questions.
0
 

Author Comment

by:strmtrpr
ID: 1180047
I forgot the == I tried it with i=12;

thanks for the help.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question