CPS 196 Week 9

CPS 196 Week 9 - Week 9 10/24/11 Functions - Four things...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Week 9 10/24/11 Functions - Four things about functions o Who can call (ignore_ o Type of value it returns Int, float, char, void (nothing to return) o Its name o The argument it takes How many arguments What are their types What are their names that will be available inside this function 1. What is/are the purpose(s) of this function? What do you want from this function? Main function Start (circle) | Ask for # of data (square1) | Ask for value of data (square2) | Show chart (square3) | Stop (circle) Each (square) can be a function Function Names 1. GetNumData 2. GetValues 3. ShowChart 2. What does these function need to perform its task? (This question will help you identify arguments) 1. Function “getValues” a. Get values of each data b. Needs number of data, array of data c. ?getValue (int data [], int num data) 3. What are the results of this function? -Help identify what it should return void getValues (int data[], int numData) { ;;;; { Function getNumData 2. answer to question 2 is nothing
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3. Give back the number of Data that User entered
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/16/2012 for the course CPS 196 taught by Professor Staff during the Spring '08 term at Syracuse.

Page1 / 8

CPS 196 Week 9 - Week 9 10/24/11 Functions - Four things...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online