General Computer Science for Engineers CISC 106 Lecture 27 Dr. John Cavazos Computer and Information Sciences 04/27/2009.

Slides:



Advertisements
Similar presentations
Lecture Computer Science I - Martin Hardwick Strings #include using namespace std; int main () { string word; cout
Advertisements

Chapter 2: Basic Elements of C++
Computer Science 1620 Math Library. Remember this program? suppose that I invest $25000 into a mutual fund that returns 8% per year. Write a program to.
Vectors, lists and queues
ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne
Data Structures (Second Part) Lecture 2 : Pointers Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University.
Computer Programming Basics Assistant Professor Jeon, Seokhee Assistant Professor Department of Computer Engineering, Kyung Hee University, Korea.
Dale/Weems/Headington
General Computer Science for Engineers CISC 106 Lecture 28 Dr. John Cavazos Computer and Information Sciences 04/29/2009.
General Computer Science for Engineers CISC 106 Lecture 32 Dr. John Cavazos Computer and Information Sciences 05/08/2009.
1 9/10/07CS150 Introduction to Computer Science 1 Data Types Section 2.7 – 2.12 CS 150 Introduction to Computer Science I.
General Computer Science for Engineers CISC 106 Lecture 19 Dr. John Cavazos Computer and Information Sciences 04/06/2009.
General Computer Science for Engineers CISC 106 Lecture 22 Dr. John Cavazos Computer and Information Sciences 04/13/2009.
1 9/1/06CS150 Introduction to Computer Science 1 What Data Do We Have? CS 150 Introduction to Computer Science I.
1 9/8/08CS150 Introduction to Computer Science 1 Data Types Section 2.7 – 2.12 CS 150 Introduction to Computer Science I.
General Computer Science for Engineers CISC 106 Final Exam Review Dr. John Cavazos Computer and Information Sciences 05/18/2009.
1 9/20/06CS150 Introduction to Computer Science 1 Review: Exam 1.
General Computer Science for Engineers CISC 106 Lecture 31 Dr. John Cavazos Computer and Information Sciences 05/06/2009.
CS31: Introduction to Computer Science I Discussion 1A 4/2/2010 Sungwon Yang
General Computer Science for Engineers CISC 106 Lecture 34 Dr. John Cavazos Computer and Information Sciences 05/13/2009.
General Computer Science for Engineers CISC 106 Lecture 30 Dr. John Cavazos Computer and Information Sciences 05/04/2009.
General Computer Science for Engineers CISC 106 Lecture 33 Dr. John Cavazos Computer and Information Sciences 05/11/2009.
1 CS150 Introduction to Computer Science 1 Exponents & Output page & Section 3.8.
General Computer Science for Engineers CISC 106 Lecture 26 Dr. John Cavazos Computer and Information Sciences 04/24/2009.
General Computer Science for Engineers CISC 106 Lecture 18 Dr. John Cavazos Computer and Information Sciences 3/27/2009.
1 9/26/07CS150 Introduction to Computer Science 1 Exponents & Output page & Section 3.8.
Programming is instructing a computer to perform a task for you with the help of a programming language.
Software Engineering 1 (Chap. 1) Object-Centered Design.
Variable = expression type name; int x;x____________________ int y;y____________________ int z;z____________________.
Chapter 1 Quiz Questions (CGS-3464) Mahendra Kumar
Functions Pass by Reference Alina Solovyova-Vincent Department of Computer Science & Engineering University of Nevada, Reno Fall 2005.
General Computer Science for Engineers CISC 106 Lecture 04 Dr. John Cavazos Computer and Information Sciences 09/10/2010.
Data & Data Types & Simple Math Operation 1 Data and Data Type Standard I/O Simple Math operation.
Current Assignments Homework 3 is due tonight. Iteration and basic functions. Exam 1 on Monday.
Multiple Files. Monolithic vs Modular  one file before  system includes  main driver function  prototypes  function.
Lecture 3: The parts of a C++ program Professor: Dr. Miguel Alonso Jr. Fall 2008 CGS2423/COP1220.
Fundamental Programming: Fundamental Programming Introduction to C++
1 CS161 Introduction to Computer Science Topic #3.
First steps Jordi Cortadella Department of Computer Science.
Tracing through E01, question 9 – step 1 // p02.cc P. Conrad, for CISC181 07S // Exam question for E01 #include using namespace std; void mysteryFunction(int.
CSC1201: Programming Language 2 Lecture 1 Level 2 Course Nouf Aljaffan (C) CSC 1201 Course at KSU1.
Control Structures (B) Topics to cover here: Sequencing in C++ language.
1 COMS 261 Computer Science I Title: C++ Fundamentals Date: September 05, 2005 Lecture Number: 4.
Introducing C++ Programming Lecture 3 Dr. Hebbat Allah A. Elwishy Computer & IS Assistant Professor
1 8/31/05CS150 Introduction to Computer Science 1 Hello World!
11/10/2016CS150 Introduction to Computer Science 1 Last Time  We covered “for” loops.
General Computer Science for Engineers CISC 106 Lecture 12 James Atlas Computer and Information Sciences 08/03/2009.
Introduction to C++.  Computers: CPU, Memory & Input / Output (IO)  Program: Sequence of instructions for the computer.  Operating system: Program.
12/14/2016CS150 Introduction to Computer Science 1 Announcements  Website is up!   All lecture slides, assignments,
ISLAMIC UNIVERSITY OF GAZA FACULTY OF ENGINEERING ISLAMIC UNIVERSITY OF GAZA FACULTY OF ENGINEERING Computer Programming Lab 1 Programming Basics By Eng.
3/6/2016Chung-Chih ISU IT 2791 Spec of the program outputs: What's your name? Dennis Hi! Dennis! Input the price for 10% discount: 200 Input the quantity:
Chapter 2 Creating a C++ Program. Elements of a C++ Program Four basic ways of structuring a program Four basic ways of structuring a program 1.Sequencing.
1 17/4/1435 h Monday Lecture 3 The Parts of a C++ Program.
CS 240 Computer Programming 1
General Computer Science for Engineers CISC 106 Lecture 09 Dr. John Cavazos Computer and Information Sciences 03/04/2009.
Looping I (while statement). CSCE 1062 Outline  Looping/repetition construct  while statement (section 5.1)
Intro to Programming Week # 6 Repetition Structure Lecture # 10
Command Line Arguments
Introduction to C++ October 2, 2017.
CS149D Elements of Computer Science
Random Number Generation
C++ fundamentals Lecture 1, Chapter 2 – pp /22/2018 Y K Choi.
אבני היסוד של תוכנית ב- C++
אבני היסוד של תוכנית ב- C++
Counting Loops.
CS150 Introduction to Computer Science 1
COMS 261 Computer Science I
Spec of the program outputs:
Reading from and Writing to Files Part 2
CSE Module 1 A Programming Primer
Presentation transcript:

General Computer Science for Engineers CISC 106 Lecture 27 Dr. John Cavazos Computer and Information Sciences 04/27/2009

Lecture Overview Anatomy of a C++ program Read Ullman and Singer (Chps 1 – 2)

#include using namespace std; int main() { // display output cout << “Hello World\n”; } A library providing input and output functionality

#include using namespace std; int main() { // display output cout << “Hello World\n”; } Can use names in the standard C++ library

#include using namespace std; int main() { // display output cout << “Hello World\n”; } All C++ programs have a main fuction

#include using namespace std; int main() { // display output cout << “Hello World\n”; } A comment

#include using namespace std; int main() { unsigned short quantity; float price; float taxRate; float totalPrice;

// Assign some values quantity = 3; price = 10.75; taxRate = 0.05; cout << “The cost of “ << quantity << “ pizzas at a price of $” << price << “ with tax comes to $”;

// Assign some values totalPrice = (quantity * price) + ((quantity * price) * taxRate); cout << totalPrice << “.” << endl; }