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

For Loop

   Every loops has a number pf the same basic elements in it. 
1. A beginning
2. 
An important block of code that needs to be run.
3. A testing condition or statement that judges whether or not to exit the loop.
​4. An end

A For loop changes the recipe from the While loop slightly. In the beginning of the For loop we initialize everything thing. I love this structure because it allows me to make sure that I am getting everything in the loop at the beginning so that I don't forget a piece later. It then runs along and treats the block of code as it own element.
Picture
Here is what the for loop looks like in code:
​

using System;
  
class forLoopDemo
{
    public static void Main()
    {
        for (int x = 1; x <= 4; x++)
            Console.WriteLine("DigitalfxtBook.com is amazing");
    }
}

Explanation of the code

So lets look at exactly what this code is doing:
1. We create our organization with the Class (forLoopDemo) and the Method (public static void Main())
​2. We then initialize the loop with three statements
     1. int x = 1 (this is our counter)
     2. x <= 4 (this is our condition testing to see if our loop has run for at least 4 times)
     3. x++ (this increments our counter up by one)
   Soooo in essence this one statement gets everything set up.
     The establishment of our counter only happens once.
     Every time the loop cycles through the test is run to make sure that the loop is going to happen one more time.
     At the end of the loop the counter gets incremented.
3. Now that the loop has been initialized we can run the important block of code inside of it.


Assignment

So in this lesson what you are going to create is:
1.
Write a program that prints out ever odd number between 0 and 30.
​

Here are some helpful hints to accomplish this lesson

1. In the video above you were supposed to print out every even number
​2. we need it to print out every number not even....

​
Proudly powered by Weebly