C++ Tutorials: 3, Program Flow (If, Else, While, For)

Program Flow is what you think it is. How the program will flow. As you know the compiler will just go down the code. Program flow is what you use to make it run a certain thing a few times, do something based on a variable, etc... There are some basic comands to program flow. The first two are loops: While and For. When you want something to loop for an amount of times based on a variable, use while. If you know how many times you want something to run, use for. If and else statements are pretty self explanable. Dont be afraid, I will go over all the syntaxes and how to do everything!

The For Loophttp://www.syschat.com Use a for loop when you know how many times you want something to run. For example, we want to have an application that counts from 0 to 50 and count by fives. To do this we would need a for loop. Here is how you do it:

for(DEFINE VARIABLE; WHEN IT SHOULD STOP; How much you count every time the program runs){

Code you want to run. } Ok, so with our 0-50 program, we would do the following:

for(int x = 0; x < 51; x=x+5){

cout

Oswego taxi to Midway ..
In The News:

Electric Sheep Robotics has introduced an all-electric autonomous robot named Verdie to perform edging, trimming and debris-blowing. Kurt “CyberGuy" Knutsson has the details.
Hackers and scammers keep looking for ways to break into your Facebook account. Kurt “CyberGuy" Knutsson has some tips to make sure your account is secure.
Kurt “CyberGuy" Knutsson shows you how to create group texts to reach multiple people at once — and also how to leave them if you get annoyed at the volume of interruptions.
Tax fraud is on the rise, and hackers are now using identity hijacking and artificial intelligence for tax returns in someone else's name to get a refund.
Toyota's Punyo soft robot mimics human behavior, using its chest, hips and arms — in addition to its hands — like a human to handle objects,
Hackers used third-party information to break into Roku accounts, according to the streaming company. Roku says it has secured affected accounts.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Kurt "CyberGuy" Knutsson explains the simple steps for setting a Wi-Fi hot spot on an Android. If you have internet on your phone, it's easy.
Dubai recently hosted the first jet suit race with a backdrop of skyscrapers, and one observer says it was straight out of a comic book.
Kim Komando introduces ways to keep you and your devices safe while traveling. The clever hacks mentioned can protect you from hackers and jackers.
TikTok CEO Shou Chew published a video Wednesday urging users to "protect your constitutional rights" against a bipartisan bill that would force China to divest from the app.
Tech guru Kurt "CyberGuy" Knutsson says you can never be too careful with tech passwords. He explains how to keep your information safe.
The Lighthouse in New Zealand rotates 360 degrees, constantly giving those inside different views around the clock. Built in the 1990s, it's up for sale.
High school students in Colorado are learning how to design their own AI model projects, including cameras for self-driving cars and apps that can teach other languages.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Vehicles collect sensitive personal information, which is used to set auto insurance rates. That's partly why auto insurance premiums are rising.
Honda's Uni-One is a hands-free electric mobility device that can reach speeds of 3.7 mph and support a user weighing up to 242 pounds.
Kim Komando puts three AI chatbots head-to-head to decide which is the best assistant for modern problems. Compare Google Gemini, ChatGPT, and Perplexity.
To safeguard personal information on iPhones, users can employ built-in security measures and iCloud Keychain for enhanced privacy. Kurt “CyberGuy" Knutsson shows you how.
Kurt “CyberGuy" Knutsson introduces you to the City Transformer’s CT-2 electric car, which can seamlessly transition from 8 feet wide on the road to a compact 3 feet for parking.
Hackers are always looking for new ways to trick targets into downloading malware. Now, they're after cryptocurrency folks via Calendly. Kurt “CyberGuy" Knutsson has the details.
Kurt “CyberGuy" Knutsson reveals how the Microlino Lite, a compact and eco-friendly vehicle, tackles city traffic congestion with its chic design and small dimensions.
A new funeral scam targets surviving family members of those who recently died. Scammers reach out to the survivors and pose as funeral home officials.
Merlin Labs' autonomous pilot could soon hit the commercial airways and may help alleviate a looming pilot shortage, according to CEO Matt George.
There's a simple way to check your subscriptions on an Android and cancel them. Tech guru Kurt "CyberGuy" Knutsson explains how it is done.

SQL Administrator Skills Required to Support Microsoft Great Plains

Microsoft Great Plains is becoming more and more popular and... Read More

Free Software - Powerful Alternatives to Budget-Busting Software

When you buy a computer, it most likely comes with... Read More

Navision Customization: C/SIDE, C/ODBC, C/FRONT, XBRL ? Development Options

Microsoft bought Navision, Denmark based software development company, along with... Read More

Microsoft Great Plains Integration with Legacy Systems ? Overview For Developer

Looks like Microsoft Great Plains becomes more and more popular,... Read More

How a Bug Challenges to a Software Professional

It is really interesting that a bug can create problem... Read More

Selecting Microsoft Great Plains Partner/VAR/Reseller: ERP Implementation & Customization ? Overview

In the case when you represent mid-size or mid-size-to-large business,... Read More

Microsoft Great Plains in Construction & Building ? Implementation & Customization Highlights

Microsoft Great Plains could be tuned and setup to fit... Read More

Seven Reasons Why a Hosted Inventory Management Solution Might Be Right For Your Organization

Upgrading. Downtime. Maintenance. Hardware obsolescence. Implementation issues. The litany of... Read More

Microsoft CRM or Siebel

Siebel is traditional CRM market leader, however and mostly due... Read More

How To Avoid Getting Hooked By Pfishing

"Pfishing", sometimes spelled "Phishing", is a word that's used to... Read More

ERP Consulting: Microsoft Great Plains Partner Future Directions

In the Clinton era the status quo was simple: you... Read More

SQL: Querying Microsoft Great Plains ? Overview for Database Administrator/Developer

Looks like Microsoft Great Plains becomes more... Read More

Helping Newbies Understand Professional Software

The Windows registry is a huge database that ensures normal... Read More

About Microsoft Sysprep (System Preparation) Utility (Windows 2000)

The Microsoft system preparation utility for Windows 2000 is a... Read More

Microsoft CRM USA Nationwide Remote Support

Remember old good days when your company probably had Great... Read More

Snort for Network IDS

What is Snort?Snort is an open source network intrusion detection... Read More

Microsoft Great Plains Integration Manager ? Working With Text File

Microsoft Business Solutions main middle market ERP application - Microsoft... Read More

Razzle Dazzle Them

Once upon a time not so long ago, there was... Read More

Instant Messenger Clients

If you have been using the Internet for any amount... Read More

IT Strategy for Large Corporation: ERP/MRP/CRM, Unix/Linux/Windows, Microsoft/Java

Combining Microsoft Business Solutions Great Plains ERP with non-Microsoft Business... Read More

Microsoft Navision Customization and Reporting ? Tips For Programmer/IT Specialist

C/SIDE (Client/Server Integrated Development Environment) - The core of... Read More

Microsoft CRM Integration & Customization: SharePoint Document Gateway

MS CRM is very close to document workflow automation, including... Read More

Design a Web Album Using Adobe Photoshop- Part 2

So let's begin crunching down these 300 images using Adobe... Read More

Explore the Internet in a Whole New Way

For a long time now Microsoft's Internet Explorer has ruled... Read More

International Support - Microsoft Great Plains VAR/Partner Selection ? Overview for V.P. IT

Looks like Microsoft Great Plains becomes more and more popular,... Read More

shuttle from Midway Morris ..