McGill University
Assignment 3
School of Computer Science
McGill University
School of Computer Science
COMP206 Software Systems
Assignment #3
Due: March 26, 2015 at 23:30 on myCourses
Advanced C Programming
Question 1: Syntax Checker Application
Work on t
Input and Output Formats
Winter 2009 Amir Hossein Rabbani
What happened to * ?
WRITE READ
(*,*) (*,*)
Target: screen / keyboard, file
Format
Fortran Formats
The READ and WRITE statements we have seen so far are called free-format statements. The are easy
More on Arrays
Amir Hossein Rabbani Winter 2009
Array : Review
elements Index
A1 A2 An-1 An
1
2
n-1
n
Type : Name (Bound) Is the type of the values that can be stored in each element of the array Specifies the range of the indices for the subscript
REAL :
Loops and Arrays
Amir Hossein Rabbani Winter 2009
Review
Definite loop example Checking for a premier number A prime number is a positive integer bigger than one that is divisible only by itself and 1 One way to check if a number x is prime is to try divi
LOGICAL Operators and Loops Introduction
Winter 2009 Amir Hossein Rabbani
In this session
More examples on stuff we have learnt so far LOGICAL expression LOGICAL data type LOGICAL operators Introduction to loops
LOGICAL expression
Facts : Girls do not c
Start Programming in Fortran
Amir Hossein Rabbani Winter, 2009
Outline
In this course you will learn: How to use Read/Write statements When to comment our program How to write a simple Fortran program How to perform arithmetic operations in Fortran and sa
Basic computer and programming concepts
Amir Hossein Rabbani Winter, 2009
Computer Software (program)
A program is a set of step-by-step instructions that directs the computer to do the tasks you want it to do and produce the results you want. In what fo
11/10/2008
Integration Numerical Integration
Nathan Friedman Many applications require evaluating the integral of a function The integrals of many elementary integrals of many elementary functions cannot be derived analytically As we have seen, we may not
11/5/2008
Root Finding Root Finding
Nathan Friedman Fall, 2008 Many applications involve finding the roots of a function f(x). That is, we want to find a value or is we want to find value or values for x such that f(x)=0
2008
Root Finding
2
Roots of a Qua
Wheres Waldo? Searching and Sorting
Nathan Friedman Fall, 2008
2008
Searching and Sorting
2
Wheres Waldo?
A common use for computers is to search for the whereabouts of a specific item in list item in a list The most straightforward approach is just to st
10/19/2008
Swap Two Values They went that away!
Pointers in C Nathan Friedman Fall, 2008
void swap(int x, int y) cfw_ int temp; temp = x; x = y; y = temp;
2008
Pointers
2
What Happens?
void main () cfw_ int a, b; a = 27; b = 103; swap(a,b); printf ("0 0
10/16/2008
Quadratic Roots Revisited From Fortran to C Part 2
Nathan Friedman Here is an example we looked at last lecture
2008
From Fortran to C - part 2
2
Roots of a Quadratic in C
#include <stdio.h> #include <math.h> void main() cfw_ float a, b, c; flo
Nathan Friedman 2009
How are Fortran and C similar? What are the differences? How can I use my knowledge of Fortran to program in C? How can I compile a C program?
From Fortran to C
2009
2
#include <stdio.h>
PROGRAM hello IMPLICIT NONE !This is my first p
Delegating Tasks
Subprograms Nathan Friedman 2008
Prime Numbers
Applications that use cryptography, random number generators, simulation, hashing and others require prime numbers What is a prime number? A positive integer is prime if it has no proper divi
More on Multidimensional Arrays
Amir Hossein Rabbani Winter 2009
QuickTime and a decompressor are needed to see this picture.
Review
Hotel_Elephant ( table , floor , room )
INTEGER : Hotel_Elephant (2,4,6) Column Indices
Declaration:
1 2 3
1
2
3
4
5 1
6
1
Functions
Amir Hossein Rabbani Winter 2009
What is a Function?
QuickTime and a decompressor are needed to see this picture.
Lets look at an example
Example
Get two numbers from the user Calculate the following expression
C=A!+B!
! C = A! + B! PROGRAM sum
Intro
The goal here is not to reteach the whole class or completely summarize the
slides, but to give straightforward examples of some of the concepts I found
trickiest when taking 206. Im not saying that these concepts are key to the
midterm (I havent se
\Leriil University School of Computer Science COMP-206
Sectionl — Multiple choice |30 pointsl
1. Which adjectives best describe Unix (circle as many as apply)
Fast
2. Which part of Unix is always in RAM (circle as many as apply)
(a) Utilities
(b) Librarie
McGill University
School of Computer Science
Introduction to Software Systems
Midterm Exam
February 27, 2014 In Class
Instructor: Joseph Vybihal
Student Name: _
Student ID: _
Instructions
No notebooks or textbooks permitted in this exam.
Language translat
McGill University
COMP 206
School of Computer Science
McGill University
School of Computer Science
COMP-206
Mini Assignment #1
Due: September 23, 2017 on myCourses at 23:30
(two late days, -5% each day)
Question 1: The Linux Manifesto
Google Linux Documen
McGill University
COMP 206
School of Computer Science
McGill University
School of Computer Science
COMP-206
Mini Assignment #2
Due: October 6, 2017 on myCourses at 23:30
(two late days, -5% each day)
Command-line Bash Script
Create a script called MakePro
Assignment 2
COMP 206, Fall 2016
Due: Friday October 21st, (23:59) via My Courses
100 marks total
Warm-Up Exercises
Not for marks. The TAs or instructor will solve these for you in office hours, if you wish.
Tutorial 1 - Sorting Integers
A text file conta
Input and Output Formats
Fall 2009 Sina Meraji
What happened to * ?
WRITE READ
(*,*) (*,*)
Target: screen / keyboard, file
Format
Fortran Formats
The READ and WRITE statements we have seen so far are called free-format statements. The are easy to use but
More on Arrays
Sina Meraji Fall 2009
Array : Review
elements Index
A1
1
A2
2
An-1 An
n-1 n
Type : Name (Bound) Is the type of the values that can be stored in each element of the array Specifies the range of the indices for the subscript
REAL : course_gra
Loops and Arrays
Sina Meraji Fall 2009
Review
Definite loop example Checking for a premier number A prime number is a positive integer bigger than one that is divisible only by itself and 1 One way to check if a number x is prime is to try dividing x by e