One more post

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmallestFactor
{
    class Program
    {
        static void Main(string[] args)
        {           
            Console.WriteLine("Enter the minimum number : ");
            int minnumber = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("Enter the maximum number : ");
            int maxnumber = Convert.ToInt32(Console.ReadLine());
           
            if ((minnumber < 1) || (maxnumber < 1) || (maxnumber <= minnumber))
            {
                Console.WriteLine(@"Either Minimum is less than 1 Or Maximum is less than 1 Or Maximum is less than Minimum. Exiting Application.");
                Console.ReadKey();
                return;
            }
           
            int i = 0;
            int numseq = 0;
            for (numseq = minnumber; numseq <= maxnumber; numseq++)
            {
                int counter = 0;
                for (i = 1; i <= numseq; i++)
                {
                    if (numseq == 1)
                        break;

                    if (numseq % i == 0)
                    {
                        {
                            counter = counter + 1;
                            if (counter == 2)
                            {
                                break;
                            }
                        }
                    }
                }
                Console.WriteLine("The smallest factor for {0} is {1}", numseq, i);
            }
            Console.ReadKey();
        }
    }
}

/* Select the smallest and biggest numbers. If smallest or biggest is less than 1 or if max is less than min, then abort. Whenever the modulo is equal to 0 , increment the counter. If counter = 2, then exit and type in the value of i*/


for loops

In computer science a for loop is a programming language statement which allows code to be repeatedly executed. A for loop is classified as aniteration statement. The keyword used to declare a for loop is based on the heritage of the language and the prior programming languages it borrowed from, so programming languages that are descendants of or offshoots of a language that originally developed an iterator will often use the same keyword to name an iterator, e.g. descendants of ALGOL will use "for", while descendants of Fortran will use "do." Some languages started from scratch, and didn't have a predefined term for an iterator to choose from, which is why COBOL uses "PERFORM VARYING".
Unlike many other kinds of loops, such as the while loop, the for loop is often distinguished by an explicit loop counter or loop variable. This allows the body of the for loop (the code that is being repeatedly executed) to know about the sequencing of each iteration. For loops are also typically used when the amount of iterations is known before entering the loop. For loops are the shorthand way to make loops when the number of iterations is known, as a for loop can be written as a while loop.
The name for loop comes from the English word for, which is used as the keyword in most programming languages to introduce a for loop. The loop body is executed "for" the given values of the loop variable, though this is more explicit in the ALGOL version of the statement, in which a list of possible values and/or increments can be specified.

My First Post

Here is teh first post ... fo rtesting th enew template...
Select any physical machine where you want the VHD to be created :
1. Select a machine where Win 7 RC or Windows Server 2008 R2 is installed. On this machine, install WAIK. You can download the WAIK for Win 7 or Win 2K8 R2 from  www.microsoft.com site for free. Its a free downloadable file.
2. Opened CMD. Typed in the command DISKPART. We can create a virtual disk using DISKPART utility.
Syntax Used : Create VDisk File="D:\VHD\bootvhd.hd" Maximum=15000 type=fixed
The virtual harddisk is created in D:\VHD with name bootvhd.vhd
3. Copied the Install.win (available on TS-CORE-43 machine) into D:\VHD folder.
4. Attached the VDisk using the syntax : attach VDisk
5. Once done, typed in : List Disk. This listed all the available disks. The newly created virtual disk was showing up as "Disk 1"
6. Selected the newly created disk using : select Disk 1
7. Created a primary partition : create part primary
8. Now selected the primary partition :  select part 1
9. Made the partition active: active
10. Formatted the partition : format fs=ntfs quick
11. Assigned a drive letter (The letter was assigned automatically) : assign
The new virtual disk was created with letter "G"
12. Placed the Imagex tool in the D:\Windows\System32
13. Got the Index of the file using the syntax below :
D:\Windows\System32>imagex /info d:\vhd\install.wim
This command gave the following data:
ImageX Tool for Windows
Copyright (C) Microsoft Corp. All rights reserved.
Version: 6.1.7100.0
WIM Information:
----------------
Path:        d:\vhd\install.wim
GUID:        {4e82a2aa-e72a-4e48-a9f3-baf57520c149}
Image Count: 8
Compression: LZX
Part Number: 1/1
Attributes:  0xc
             Integrity info
             Relative path junction
Available Image Choices:
------------------------
<WIM>
  <TOTALBYTES>2719372524</TOTALBYTES>
  <IMAGE INDEX="1">
    <DIRCOUNT>13545</DIRCOUNT>
    <FILECOUNT>59992</FILECOUNT>
    <TOTALBYTES>10298617619</TOTALBYTES>
    <CREATIONTIME>
      <HIGHPART>0x01C9C331</HIGHPART>
      <LOWPART>0xA363D554</LOWPART>
    </CREATIONTIME>
    <LASTMODIFICATIONTIME>
      <HIGHPART>0x01C9C358</HIGHPART>