Digital FXtbook
Easy Contacts
  • Home
    • Free Software
    • The Author
    • Former Students Hall of Fame
    • A tribute....
  • Gaming
    • Board Game Game Design Document
    • Modeling >
      • Introduction: The Temple
      • Minecraft Steve
      • Minecraft Tools and Weapons
      • Roblox Character modeling
      • Sword of Light
      • Buzz Axe
      • Halo 1 Blood Gulch Base
      • Hammer
      • Sword
      • Character Modeling Big Daddy
      • Shield
      • The OM6G
      • Weapon
      • Character Modeling Legion the Geth
      • Character Modeling Geth Armor
    • Animation >
      • Character Animation
    • Rigging >
      • Rigging with HumanIK
      • Characterizing and MoCap
      • Integration with Unity
    • Unity >
      • Terrain
      • Importing Models
  • Coding
    • Beginning C# >
      • First Unit >
        • First Program
        • Comments >
          • PsuedoCode
        • Variable Types >
          • AlphaNumeric Variables
          • Numeric Variables
        • Getting input from the user
        • Try and Catch
        • Operators >
          • Assignment Operators >
            • Zeller's Congruence
            • Leap Year
          • Comparison Operators >
            • Logical Data, Illogical Assignment
          • Arithmetic Operators >
            • Use of Parenthesis
            • Algebra in code and assundry CHAOS
            • Pre and Post Operators
            • Shortcut Operators
            • Floats Conversion from Metric to English
            • When is Easter??
          • Logical Operators
        • Casting
      • Second Unit >
        • Conditional Statements >
          • Number validator
          • Number tester
          • Speed Camera
        • Random Class
        • Arrays >
          • Simple Arrays
          • Complex Arrays
        • Loops >
          • For Loops >
            • Adding Numbers
          • For Each Loops
          • While Loops
          • Do While Loops
      • Third Unit
    • Intermediate C# >
      • Object Oriented Programming
    • Unity Coding >
      • Introduction Unity Lesson
      • Number Wizard Game #1
      • Second Unity Game: Text Adventure
      • Number Wizard Game GUI
      • Block Breaker >
        • Block Breaker Game #1
        • Block Breaker Game #2
        • Block Breaker Game #3
        • Block Breaker Game #4
    • Linda Training >
      • What is C#?
      • Working with Classes
  • Student Films
    • Advanced Student's movies
    • Beginning Student's movies
  • Adobe
    • Photoshop >
      • Introduction
      • Selection Tools >
        • Melonhead >
          • Melonhead Creative
        • Breakfast Lunch or Dinner
        • Blu 42
      • Painting Tools >
        • Invisi-World
        • Image Adjustment
        • FreeStyle project
      • Drawing Tools >
        • Abstract Expressionism
    • Premier >
      • Linda Training Intro
      • Basic Editing
      • Editing Refinement
    • Illustrator >
      • Vector Ninjas
      • Live Art Painting
      • Starting the Pen Tool
      • Apple and Pear
      • Creating Your LOGO
      • Self Portrait
  • Com Apps
    • Com Apps page 1
    • Com Apps page 2
    • Com Apps page 3
    • Com Apps page 4
  • Links
    • Distance Reconnecting
    • Key Board Fix/Hack
    • Buiding Piers >
      • Buiding Piers
      • Buiding Piers
    • The Top Six Animation Schools
    • The Top Video Game Design Schools
    • Contests >
      • International Team

Functions

Functions are something that we have been using since day one in this class.

We didn't realize that we were creating a function, but now we will begin discussing functions in such a way that you will realize that;
     int main ()
    {

     }
is a function. When we begin to realize that this is a function and that we can have more than one of them, this greatly expands what we can do within our program.

​Here are somevideos to help bring the point home to you.

Functions Videos

Here are a couple more videos that goes deeper into Functions

The assignment 

Scenario Some time ago we asked you to write a program to find out if a certain year was leap or common.

We want to return to the issue, but in a completely different form.

We want you to write a function equipped with the following features: its name should be "isLeap"; it accepts one argument of type int representing the year number; it returns a bool value: true if the year is leap and false otherwise; it should be mute!

It mustn't write anything to the output – the only way it reveals its actions is by the value it returns.

We've prepared a skeleton of the program – fill the function body with the appropriate content. We've also attached the output that is expected from your program.

Examples

1995 -> 0
1996 -> 1
1997 -> 0
1998 -> 0
1999 -> 0
2000 -> 1
2001 -> 0
2002 -> 0
2003 -> 0
2004 -> 1
2005 -> 0
2006 -> 0
2007 -> 0
2008 -> 1
2009 -> 0
2010 -> 0
2011 -> 0
2012 -> 1
2013 -> 0
2014 -> 0
2015 -> 0
2016 -> 1

Good luck

Proudly powered by Weebly