C++ Tutorial 2, Input and Variables

This is the tutorial where we really get into programming. Input and variables are the essence of programming. In this tutorial you will learn how to get data from the user and use variables. You will learn the types of variables there are and how to do basic math with them. At first, this may seem boring and pointless, but you have to learn it, and it should go quick.

Basic Input
When you are making a console application, here is how you should get user input. Some of you may have guessed it, you use c[b]in[/b], of course, the 'c' meaning console and the 'in' meaning input, like 'cout'. So, here is a basic code, where the name of the variable x. cin>>x;

Defining Variables
A variable is what you guessed, a number or piece of data that will vary.

The diffrent types of variables:

bool - true or false
int - whole numbers
char - character (a, b, c, etc...)
string - multiple characters (words, etc..)
float,double - numbers that can have decimals

When deciding what type of variable to use, think about what kind of data it is going to be storing and remember that some data types use more memory than others, however most of your applications will use less memory than you have. To declare a variable, write the type of variable, then the name.

Examples:
int myInt = 7;
char thisChar= 'a', otherChar = 'b', char newChar;
string password= "password";

Syntaxes
Notice how I always had the first word not capatalized, but I capatalized all the other ones. You can also define more than one at a time, and you dont always need to set the value in the begining. Also, when you use a char, use a ' and for a string a ". Try to give your variables meaningful names.

Math
This is really the heart of programming, math! For now, we are going to be doing some simple arithmetic.

The basic math functions are:

+ = addition
- = subtraction
/ = division
* = multiplication

There are a bunch more, but that is all we need for now.

Go out and make a program!

Now that you know some of that basic stuff, try making a program, and dont be afraid to ask for help on http://www.syschat.com!

Chris Silop - http://www.syschat.com!, Computer Forum

cheapest limo Akin .. Lockport Chicago limo O’Hare
In The News:

Tech expert Kurt “CyberGuy" Knutsson says using outdated computers and software leaves them vulnerable to security risks and malware.
Tech expert Kurt “CyberGuy" Knutsson reveals how WalkON enhances walking and jogging with sensors and artificial tendons.
Old-fashioned check fraud is back in style, quintupling over the past year. Here are a few low-tech, practical means of protecting yourself.
Tech expert Kurt “CyberGuy" Knutsson discusses how 600,000-plus records, including checks and property data, were left exposed online by an information service provider.
That weird text from a friend may actually be from a hacker. Kurt “CyberGuy" Knutsson tells you what signs to look out for.
Scammers can wreak havoc on your life just by having your phone number. Kurt "CyberGuy" Knutsson addresses how to avoid becoming a victim.
PongBot is an artificial intelligence-powered tennis robot and a smart training partner available to play 24 hours a day, seven days a week.
Kurt "CyberGuy" Knutsson explains how to update your iPhone to add Apple Intelligence, which he says can transform your interactions with your phone.
University scientists have trained a robotic surgical system to do work with the skill of human doctors, possibly transforming the future of surgeries.
As more companies implement artificial intelligence for daily tasks, some industry leaders are working to push back against certain aspects of the technology.
Tech expert Kurt “CyberGuy" Knutsson says the Batagaika crater in Siberia expands 35 million cubic feet yearly due to thawing.
While fewer than 30% of farmers reportedly use emerging technologies like artificial intelligence, experts believe AI could help producers and farmers make food quicker and more efficiently.
Amazon becomes a prime target of scammers during the holiday shopping season trying to steal Social Security numbers, bank information and Amazon credentials.
Spammers have found a way to target Spotify playlists and podcasts to push pirated software, cheat codes for games and spam links and malware sites.
Sharing information online like your vacation plans and relationship status can make you a target for scammers; here's what to avoid posting to keep yourself safe.
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 explores six sneaky holiday season gift card tricks, providing tips on how to outsmart scammers trying to rip you off.
Apple Watch's Translate app gives you your own personal interpreter, allowing you to have live two-way conversations in up to 20 different languages.
With kids facing a seemingly increasing amount of threats from creeps on the internet, here's how you can respectfully ask people not to post photos of your children on social media.
Tech expert Kurt “CyberGuy" Knutsson reveals how to regain your Facebook access if you get hacked or locked out.
Kurt “CyberGuy" Knutsson explains how to safeguard retirement accounts from cyber threats with a VPN: encryption, anonymity, secure access.
I’m going to Europe soon, and planning my trip was a breeze. Yes, really! AI did a big chunk of the work for me — and it can help you plan your next getaway, too.
Tech expert Kurt “CyberGuy" Knutsson says North Korean hackers hide malware in macOS apps, bypassing Mac security checks.
Kurt “CyberGuy" Knutsson reveals how iPhone’s new Automatic Mic Mode adjusts settings for optimal call quality automatically.
Jeff Hancock, an expert on AI and misinformation, has been accused of fabricating an expert declaration by citing a study that was allegedly made up by AI.

Microsoft CRM Integration With Microsoft Office Documents ? Overview For System Integrator

Microsoft CRM is CRM application, maintained and supported by Microsoft... Read More

Navision Attain Database access via C/ODBC in ASP.NET Application

Navision Software was purchased by Microsoft and now it is... Read More

Microsoft Great Plains Implementation in Russia ? Overview for Consultant

Microsoft Business Solutions Great Plains is very popular ERP platform... Read More

Great Plains Dexterity ? Microsoft Great Plains Customization Overview

Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics... Read More

Microsoft Great Plains Subcontracting ? Overview for Microsoft Business Solutions Partner

Microsoft Business Solutions Great Plains is very popular ERP/MRP applications... Read More

Corporate ERP: Standard vs. Rich functionality ? Microsoft Great Plains

Traditionally we were considering functionally rich systems, such as SAP,... Read More

Put Some Pizazz in Your Software Arsenal

The software giants don't do everything and don't always produce... 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

Software Review: Xsitepro Total Site Management Software

It's not very often I get excited about a software... Read More

Microsoft Great Plains Reporting ? Overview for Developer

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

Lotus Domino/Notes - Microsoft Great Plains Tandem as ERP with Documents Workflow - Overview for IT

Lotus Domino/Notes ? Microsoft Great Plains tandem as ERP with... Read More

ERP Remote Support: Microsoft Great Plains Analysis ? Pluses & Minuses

Former Great Plains Software Dynamics/eEnterprise and currently Microsoft Business Solutions... Read More

Microsoft RMS Customization ? PO Items Receiving in Great Plains

Microsoft Retail Management (RMS) and Microsoft Great Plains are retail... Read More

Microsoft Great Plains Data Conversion ? Overview For Developer

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

Instant Messaging is a Sweet Way to Communicate

MSN messenger is a pretty cool invention. I mean I'm... Read More

Spyware Definitions List

The adware and spyware definitions list is very long. But... Read More

The Dirt on Screensavers

Remember back in the days where screensavers were the coolest... Read More

Microsoft Great Plains ? Licensing & Product Versions

Current Microsoft Business Solutions Great Plains has more that 10... Read More

20 Extra Hours Per Week: What Would You Do?

While I was in college, if you would have asked... Read More

Microsoft Great Plains: If You are Orphan Client ? What to Do and FAQ

Microsoft Business Solutions Great Plains, former Great Plains Software eEnterprise,... Read More

Mozilla Vs. Firefox

For those who are unclear on the differences between the... Read More

Start Developing Your Own Software

Learning how to program software seems like a daunting task... Read More

Daffodil DB: Web Database

What is a Web Database?A web database is a database... Read More

Beware of Spyware

One day, you suddenly realize that your computer started to... Read More

How To Identify, Cure and Prevent Spyware/Adware Infections

Just when you thought you were Web savvy, one more... Read More

Aledo wedding limo ..