Learn to Program C++ Tutorial: 2. variables
Preview
|
Buy lesson
Buy lesson
(only $0.99) |
You Might Also Like
-
HTML Lesson 4: The DOCTYPE Declaration -
Learn to Program C++ Tutorial: 3. Decisions -
Learn to Program C++ Tutorial: 1. The Compiler -
Using My Account and Placing Holds in FindIt -
How to run linux from a usb flash drive -
Learn PHP Tutorial: 5. Variables -
Learn PHP Tutorial: 10. Input -
Baseball Soft Toss Drill -
Soft Pastel on Ingres Paper using water -
6-How to Play the Drums: Accents
-
6-How to Play the Drums: Accents -
Soft Pastel on Ingres Paper using water -
Baseball Soft Toss Drill -
Learn PHP Tutorial: 10. Input -
Learn PHP Tutorial: 5. Variables -
How to run linux from a usb flash drive -
Using My Account and Placing Holds in FindIt -
Learn to Program C++ Tutorial: 1. The Compiler -
Learn to Program C++ Tutorial: 3. Decisions -
HTML Lesson 4: The DOCTYPE Declaration -
Learn to Program C++ Tutorial: 3. Decisions -
Learn to Program C++ Tutorial: 1. The Compiler
About this Lesson
- Type: Video Tutorial
- Length: 10:50
- Media: Video/mp4
- Posted: 07/08/2009
- Use: Watch Online & Download
- Download: MP4 (iPod compatible)
- Size: 20 MB
This lesson is part of the series: Intro to Programming in C++
In this lesson we create a C++ program that requests the user to input distance and time, and then calculates the velocity.
The concepts covered in this video include: comments, include statements, iostream library, namespaces, the std namespace, cout, endl, variables, variable declaration, floats, cin, and using namespace command.
If you don't already have a C++ compiler you'll need to watch the 1st video to get and setup a C++ compiler.
Click Here to view the compiler video:
http://www.mindbites.com/lessons/edit/4658-learn-c-tutorial-1-the-compiler
About this Author
-
- Tomorrow Soft
- 3 lessons
- Joined:
07/06/2009
Tomorrow Soft is a premier developer of video tutorials teaching everyday men and women the skills they need to start creating their own programs from scratch.
More..Recent Reviews
This lesson has not been reviewed.
Please purchase the lesson to review.
Recent Comments
This lesson has not been reviewed.
Please purchase the lesson to review.
The Two Ways of writing Comments in C++:
/* This is an example of
comment Type One. */
// This is an example of Comment Type Two
If you follow along with the lesson, by the end you'll have the following code. In the lesson the code is explained thoroughly and fully.
/*
* main.cpp
*
* Created on: Jul 7, 2009
* Author: TomorrowSoft
*/
#include <iostream>
using namespace std;
int main()
{
cout << "**************************" << endl;
cout << " Velocity Calculator " << endl;
cout << "**************************" << endl;
cout << endl;
// Variables
float Velocity, Distance, Time;
// Get Input From User
cout << "Enter Distance: ";
cin >> Distance;
cout << "Enter Time: ";
cin >> Time;
// Calculate Velocity
Velocity = Distance / Time;
// Output Velocity to Screen
cout << "Answer: Velocity = " << Velocity << endl;
return 0;
}
Buy Now and Start Learning
CommunityMore
Embed this video on your site
Copy and paste the following snippet:
Link to this page
Copy and paste the following snippet:

