Solved

loops

Posted on 1998-12-13
2
218 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 20 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
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 goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now