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
professional maid services Deerfield ..Microsoft Business Solutions Great Plains might be considered as ERP... Read More
Microsoft Business Solutions Great Plains was designed back in the... Read More
Microsoft Business Solutions Great Plains, Navision, Axapta, Solomon and CRM... Read More
Microsoft Great Plains is main Microsoft Business Solutions accounting package... Read More
We'll give you non formal view, based on our consulting... Read More
In the real world a "fire wall" is a fireproof... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
Microsoft Business Solutions Great Plains has many years of successful... Read More
Once upon a time not so long ago, there was... Read More
ERP Consulting industry is on the way to serve clients... Read More
How do you run a program on a remote server... Read More
#5 All your hardware components like Printers, PCs etc come... Read More
Before September 1995, Microsoft Windows was an MS-DOS program. DOS... Read More
This is the tutorial where we really get into programming.... Read More
IntroductionSurprised, by the title? well, this is a tour of... Read More
This article is for advanced Microsoft CRM SDK C# developers.... Read More
Whether you need to close a sale, gather end-user feedback,... Read More
Microsoft Business Solutions Great Plains was historically designed to serve... Read More
It is now common thing when large corporation selects mid-market... Read More
Microsoft Great Plains, former Great Plains Software Dynamics / eEnterprise... Read More
In our case ? we serve Microsoft Business Solutions ERP... Read More
Fundraising software lets you connect with donors in a way... Read More
Finding the best spyware removers to detect and remove spyware... Read More
Microsoft CRM is CRM answer from Microsoft Business Solutions. If... Read More
If you look back to the history, you will see... Read More
quick home cleaning Lake Forest ..The world of small business accounting software can be a... Read More
It's all about turn times in the eMedia industry! The... Read More
There are many commands that are used in linux on... Read More
As of now - Great Plains Dynamics/eEnterprise is transformed/renamed into... Read More
Microsoft Business Solutions Great Plains was designed back in the... Read More
SAP Inc., a global leader in client/server enterprise application software... Read More
Microsoft Business Solutions Great Plains has I'd say end user... Read More
Looking at all the ads which promise to get rid... Read More
I completed an experiment recently. I wanted to find out... Read More
Lotus Domino/Notes ? Microsoft Great Plains tandem as ERP with... Read More
Which Type of Shop Can Rely On A Home Built... Read More
The first topic we are going to discuss... Read More
We would like to give you pluses and minuses of... Read More
The research in the field of Natural Language Processing usually... Read More
Blue Cross and Blue Shield of Hawaii (HMSA) found itself... Read More
This tutorial covers OLAP solutions used by Data warehouses and... Read More
Since its release in 1987, QuarkXpress had made an immediate... Read More
Well, even if the combination might look very unusual, we... Read More
What is IRC?IRC is Internet Relay Chat. It is a... Read More
You probably didn't casually invite, or extend a formal attendance... Read More
(1) Avoid using the same variable again and again for... Read More
Introduction to C++Why Learn C++?C++ may at first seem like... Read More
Let us give you - developer some hints in the... Read More
Remember back in the days where screensavers were the coolest... Read More
Microsoft Business Solutions main middle market ERP application - Microsoft... Read More
Software |