Yurttas/PL/OOL/CS/F/02/05/10/00/01/Compute02.cs

From ZCubes Wiki
Jump to navigation Jump to search
 1/**
 2 *  Copyright(C) 2003
 3 *  All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
 4 *
 5 *  Permission to use, copy, modify, and distribute this
 6 *  software and its documentation for EDUCATIONAL purposes
 7 *  and without fee is hereby granted provided that this
 8 *  copyright notice appears in all copies.
 9 *
10 *  date   : September 1, 2003.
11 *  author : Salih Yurttas.
12 *
13 *  Compute02.cs
14 */
15
16
17using System;
18
19namespace C
20{
21
22  public class Compute02
23  {
24    public static void Main(string[] args)
25    {
26      // some computations ...
27      FA(2);
28
29      // some more computations ...
30      FA(4);
31
32      // some more computations ...
33      FB(4);
34
35      // some more computations ...
36      FB(2);
37    }
38
39    public static void FA(int inc)
40    {
41      int a;
42
43      Console.Write("-> a : ");
44      a = Int32.Parse(Console.ReadLine());
45      a += inc;
46      Console.WriteLine("a = {0}", a);
47    }
48
49    public static void FB(int inc)
50    {
51      int b;
52
53      Console.Write("-> b : ");
54      b = Int32.Parse(Console.ReadLine());
55      b += inc;
56      Console.WriteLine("b = {0}", b);
57    }
58  }
59
60}