Borland Turbo C++ 4.5 Full Version for PC Logo

Related Topics:

kimberly Posted on Oct 08, 2013
Answered by a Fixya Expert

Trustworthy Expert Solutions

At Fixya.com, our trusted experts are meticulously vetted and possess extensive experience in their respective fields. Backed by a community of knowledgeable professionals, our platform ensures that the solutions provided are thoroughly researched and validated.

View Our Top Experts

Loop statement - Borland Turbo C++ 4.5 Full Version for PC

1 Answer

kakima

Level 3:

An expert who has achieved level 3 by getting 1000 points

One Above All:

The expert with highest point at the last day of the past 12 weeks.

Top Expert:

An expert who has finished #1 on the weekly Top 10 Fixya Experts Leaderboard.

Superstar:

An expert that got 20 achievements.

  • Borland Master 102,366 Answers
  • Posted on Oct 16, 2013
kakima
Borland Master
Level 3:

An expert who has achieved level 3 by getting 1000 points

One Above All:

The expert with highest point at the last day of the past 12 weeks.

Top Expert:

An expert who has finished #1 on the weekly Top 10 Fixya Experts Leaderboard.

Superstar:

An expert that got 20 achievements.

Joined: Dec 16, 2009
Answers
102366
Questions
0
Helped
10724326
Points
622696

C++ has several loop statements, including for, while, and do...while. Do you have a specific question about one of them?

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

0helpful
1answer

For loop syntax in turbo c

Could you post the exact for statement you're using? It's a bit difficult to troubleshoot without seeing your actual code.
0helpful
1answer

How to use goto un java?

GoTo statement are not available in Java Rep)
1) Goto statement decrease readability of a program.
2) Goto statement may from Infinite loop
3) Goto's are not part of Structured programming
4) Goto statments make documentation difficult.
A goto statement can cause program control to end upalmost anywhere in the program,for reasons that are often hard to unravel ,However almost always, there is a more elegant way of writing the same program using if,for,while and switch. These constructs are far morelogical and easy to understand.
This is seldom a legitimate reason for using got, and its use is one of the reasons that programs become unreliable, unreadable.

goto is a keyword in java which you cant use in code.i guess if you use goto, you will get compiler error
0helpful
1answer

Do while statement in c

Here is a simple example of do while statements in C
x=10;
do { x--; } while ( x > 0 );
We set the x variable to 10 at the top of the code, and then do a "do while loop". The loop will continue until the x variable = 0. To write it out in english it is basically:x equals ten. loop the code inside the {} while x is greater then zero. Once x is zero exit the loop. Inside the {} we are de-incrementing x by minus 1 each time the loop is performed until x equals zero, and that is how the loop code is controlled.
Hope that helps.
Chris
0helpful
1answer

What is different of for loop and while loop?

The while loop is the more general one because its loop condition is more flexible and can be more complicated than that of a for loop. The condition of a for loop is always the same and implicit in the construction. A for loop stops if there are no more elements in the collection to treat. For simple traversals or iterations over index ranges it is a good advice to use the for statement because it handles the iteration variable for you, so it is more secure than while where you have to handle the end of the iteration and the change of the iteration variable by yourself.
The while loop can take every boolean expression as condition and permits therefore more complex end conditions. It is also the better choice if the iteration variable does not change evently by the same step or if there are more than one iteration variable. Even if you can handle more than one iteration variable in a for statement, the collections from which to choose the values must have the same number of elements.


0helpful
1answer

Create program for A-D:

A.) If else statement using Javascript
<script type="text/javascript">
//If the time is less than 10, you will get a "Good morning" greeting.
//Otherwise you will get a "Good day" greeting.

var d = new Date();
var time = d.getHours();

if (time < 10)
{
document.write("Good morning!");
}
else
{
document.write("Good day!");
}
</script>

B.) Switch Case Statement Using C#
using System;

class SwitchSelect
{
public static void Main()
{
string myInput;
int myInt;

begin:

Console.Write("Please enter a number between 1 and 10: ");
myInput = Console.ReadLine();
myInt = Int32.Parse(myInput);

// switch with integer type
switch (myInt)
{
case 1:
Console.WriteLine("Your number is {0}.", myInt);
break;
case 2:
Console.WriteLine("Your number is {0}.", myInt);
break;
case 3:
Console.WriteLine("Your number is {0}.", myInt);
break;
default:
Console.WriteLine("Your number {0} is not between 1 and 3.", myInt);
break;
}

decide:

Console.Write("Type \"continue\" to go on or \"quit\" to stop: ");
myInput = Console.ReadLine();

// switch with string type
switch (myInput)
{
case "continue":
goto begin;
case "quit":
Console.WriteLine("Bye.");
break;
default:
Console.WriteLine("Your input {0} is incorrect.", myInput);
goto decide;
}
}
}


C. For Loop Statement using C++
for(i=10; i > -1; i--)
{
if(i == 0)
cout << "Blast Off!" << endl;
else
cout << i << endl;
}
}

D. While Loop Using Java
void main() {

int counter = 1;

while(counter < 5 )
{
printLine("counter is equal to " + counter);

counter = counter + 1 ;
}

printLine("Goodbye");
}


0helpful
1answer

What is the use of open curly braces in turbo c?

Curly braces are used in C (Turbo and otherwise) to group statements. A group of statements inside a pair of curly braces is treated semantically as a single statement. For example, a for-loop controls one statement. If you want more than one statement within the loop, you use curly braces to group them together.
1helpful
1answer

What does ''For and Next'' in VBA mean?

For and Next are loops. What comes after the For is what condition you want to check. Then you place what you want to do. Next tell it to loop. For example,

For counter = Start To end [Step step]
[statements]
[Exit For]
[statements]
Next [counter]

Dim i as Integer
For i = 0 to 10
MsgBox(i)
Next i

That would display a message box from 0 to 10. Hope this helps!
0helpful
1answer

My Navman S30 seems to be stuck in a loop. From

Get the disk that came with it and load NavDesk on your computer delete the maps on your Navman and then reload them. This fixed the problem for me.
2helpful
1answer

Can i ask for a for loop in turbo c

for (i = initial_i; i <= i_max; i = i + i_increment)
{
...block of statements...
}

try this link too
http://www.physics.drexel.edu/students/courses/Comp_Phys/General/C_basics/#loops
1helpful
1answer

I can not escape the following program

This program has an infinite loop in it. Remove the "Goto ad0" statement. With this in, the program computes the speed and then goes to the beginning and asks for the distance and time again. And again, and again...

With the "Goto" statement out of the program, you can also remove the "Lbl" statement as well.
Not finding what you are looking for?

62 views

Ask a Question

Usually answered in minutes!

Top Borland Computers & Internet Experts

Narseman

Level 3 Expert

1092 Answers

Tim Hofstetter
Tim Hofstetter

Level 3 Expert

1407 Answers

Rob Hill
Rob Hill

Level 3 Expert

1483 Answers

Are you a Borland Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...