EMT 101 - Engineering Programming
EMT 101 - Engineering Programming
1
What Can You Do with Programming?
As a database control
Software development
2
What is Programming?
3
Computer User versus Computer Programmer
4
Computer User versus Computer Programmer
5
What is a Program
6
Choices of Programming Language
Machine language
Fortran
C++
Java
7
Machine Language
Task:
1) Move contents of memory location 10000 into location ET
2) Add the value 3000 from memory location ET
3) If the outcome is negative, proceed with instruction located in
memory location 5432
8
Fortran Language
The first high level language developed in 1957, mainly for solving
mathematical problems
9
C, C++ Language
10
Differences between these languages
11
Procedural vs. Object Oriented Programming
Procedural: need to know the details of each part of
program to use the code
12
What Scientific Programming can Do?
Movie 57 - Propeller
13
First, need to understand
14
A Sample C++ Code
#include <iostream> //to include C++ library for input and output of values
using namespace std; //to be able to use all the standard classes,
c objects and functions in C++
int main () // start of program body, main is a function with no parameters that
returns an int. value
{
int numberOfLanguages; // define an identifier numberOfLanguages as an integer data type
cout << “Hello student.\n "; // program greets the student and go to next line
<< “Welcome to EMT 101.\n”;
cout << “How many programming languages have you used? "; // program asking user to input no of
languages
cin >> numberOfLanguages; // input from user is now saved into
numOfLanguages
return 0; // to return 0 as the integer value of main, most C++ compilers need this
16