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

quick home cleaning Glenview ..
In The News:

FBI warns cybercriminals are stealing family photos from social media to create fake proof of life images in virtual kidnapping scams targeting victims.
Instagram's new 'Your Algorithm' tool lets you control your Reels feed in real time. The app now gives you power to customize what videos you see.
Major Marquis fintech breach exposes 400,000-plus Americans' data through unpatched SonicWall vulnerability, with Texas hardest hit at 354,000 affected.
Free up iPhone storage fast by clearing large photos and videos from Messages app. Simple steps for iOS users to delete attachments without losing chats.
Scammers are flooding inboxes with fake tracking alerts that mimic real carriers, exploiting the holiday rush to steal logins and personal data.
The Fox News AI Newsletter brings you the latest news on AI technology advancements and the challenges and opportunities AI presents now and for the future.
Texas family reunites with missing 11-year-old cat Grayson after 103 days using Petco Love Lost's AI photo matching technology and community help.
Tired of AI customer service loops? These insider tricks help you escape "frustration AI" and get real human help when you need it most for urgent issues.
Unlock richer audio from your streaming apps with simple tweaks to volume normalization, equalizer settings, and quality preferences for cleaner sound.
Scammers are sending fake Facebook settlement payout emails that mimic legitimate notices from the privacy settlement administrator to deceive users.
Holiday shopping scams surge as fake refund emails target distracted consumers during Black Friday and holiday seasons, costing Americans billions annually.
The AI-powered IRMO M1 exoskeleton features four modes, including turbo, eco, training and rest for hiking, running, cycling and sports with eight-hour battery life.
OpenAI announced upgrades for its ChatGPT Images platform on Tuesday, saying the program can now make more precise edits and produce images more quickly.
Chrome for Android now turns web articles into AI-powered podcast conversations. Get hands-free browsing with Google Gemini's natural audio summaries.
LastPass faces $1.6 million fine from U.K. regulators after 2022 data breach exposed 1.6 million users. Password manager failed proper security controls.
Petco disclosed a data breach exposing customer Social Security numbers, financial account details, and driver's license information due to a software error.
Baseball teams can now analyze complete swing mechanics in normal training environments using Theia's markerless AI system that processes standard high-speed footage.
Smart home hacking fears overblown? Expert reveals real cybersecurity risks and simple protection tips to keep your connected devices safe from hackers.
MIT develops needle-free glucose monitor using light technology. Revolutionary device could replace painful finger pricks for diabetes management.
The ClickFix campaign disguises malware as legitimate Windows updates, using steganography to hide shellcode in PNG files and bypass security detection systems.
Researchers from Osaka Metropolitan University designed a 21-foot dome that combines aquaculture and hydroponics to create a self-sustaining urban food system.
The Fox News AI Newsletter gives readers the latest AI technology advancements, covering the challenges and opportunities AI presents.
ChatGPT data breach exposes personal info of users through partner Mixpanel. OpenAI confirms names, emails compromised in security incident.
Android rolls out Emergency Live Video for 911 calls, letting dispatchers see real-time scenes during emergencies. Great for holiday travel safety.
Malicious Chrome and Edge extensions collected browsing history, keystrokes and personal data from millions of users before Google and Microsoft removed them.

Cisco Certification: Introduction To ISDN, Part V

The major reason I recommend getting your hands on real... Read More

25 Things Mapping Software Can Do For You

1. With mapping software you can create a report that... Read More

Microsoft Great Plains Implementation: Verticals - Wholesale Order Entry center ? overview

Microsoft Business Solutions Great Plains has substantial market share and... Read More

Guide to Software Marketing

Intro This concise article will tell you in plain English... Read More

Need of Document Management System (DMS)

Document Management or Enterprise Information Management is perhaps one of... Read More

Crystal Reports - Geterogeneus databases: SQL Server, Oracle, Unidata, Btrieve ? Tips For Developer

Crystal Reports is the most flexible tool on the market... Read More

Free Software: How Not To Get More Than You Bargained For!

I completed an experiment recently. I wanted to find out... Read More

How to Choose the BEST Charting Software

I suggest that you do not spend a lot of... Read More

How the Firefox: How to... Manual Helped Me

A few months back I really got sick of my... Read More

Microsoft Great Plains Customization Recovery & Upgrade for Large Corporation

At the end of XX century, in the late 1990th... Read More

C++ Function Templates

C++ Function templates are those functions which can handle different... Read More

When is a Software Engineer Not a Software Engineer?

The title of "software engineer" has got to be among... Read More

Performance Tuning of a Daffodil DB / One$DB -JDBC Application

This article illustrates the best practices to improve the performance... Read More

Microsoft Great Plains Upgrade ? Things to Consider and FAQ

If you have Microsoft Great Plains and support it for... Read More

7 Things to Consider Before Buying Small Business Accounting Software

The world of small business accounting software can be a... Read More

Professional Software Icons For Your Standalone Application

User interfaces and accessibility are some of the most important... Read More

ERP System of the Future: Database, Business Logic and Interface

We will base our prognosis on our Microsoft Business Solutions... Read More

QuarkXpress Tips: How to Move Content Between Print and Web Layouts

Since its release in 1987, QuarkXpress had made an immediate... Read More

A Case Study on Selecting Contract Management Software

Professional services firm cuts costs and improves productivity with integrated... Read More

Inherent Dangers Of File Sharing Via The Internet.

Cyberspace has opened up a new frontier with exciting possibilities... Read More

History of Java

The java programming language is becoming more and more popular... Read More

How To Identify, Cure and Prevent Spyware/Adware Infections

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

Review on QuarkXpress 6.0

After almost two decades of existence, Quark has become the... Read More

Groupware and Online Collaboration: Collaboration Series #4

This article is the fourth of a series of articles... Read More

Is Software Tester a Most Infamous Person in a Software Project Team?

The fact that a software tester is a most infamous... Read More

scheduled maid service Winnetka ..