usama khan

usama khan

  • NA
  • 6
  • 4.7k

Table and its solution code.

Jan 23 2014 2:43 PM
                                             (a) 6" slab
SPAN (ft) 20FT ROADWAY 40FT ROADWAY
ONE WAY TWO WAY ONE WAY TWO WAY
       W          T         W          T         W          T        W         T
5 150 150 40 30 150 150 150 120
5.5 96 150 40 30 96 150 65 120
6 75 150 40 30 75 150 53 120
7 54 150 35 30 54 150 37 100
8 38 95 24 30 38 95 24 45
9 27 57 19 23 27 57 19 22
10 21 37 15 17 21 37 15 17
11 17 23 12 14 17 23 12 14
12 15 18 10 11 15 18 10 10
13 13 15 9 8 13 15 9 7
14 11 12 8 6 11 12 7 6
15 9 8 6 5 9 8 6 5
16 7 6 4 4 7 6 4 4


this is an excel table. just .1 % of the work. 
i need to select table on the basis of slab, then has to select row. .then will Slect 40ft roadway widht or 20ft width roadway width by some conditions as shown in the code below. 
i dont want to do all these conditions manually, and as far CSV is concerned i am not getting the concept of CSV in general form. i dont know how to implement it in my situation. Plz help, there are 26 tables morever its just 5 percent of the program. so i am stuck. can someone give me better solution.i want to save my time. i donot want to do it manually.
i have defined all variabbles. 

 if (Thickness == 6)// select slab table
            {
                Console.WriteLine("Looking into 6 inch Slab thickness Table . . .");
                Console.ReadLine();
                if (Span == 5.00) // select span row in the span column
                {
                    Console.WriteLine("Now selecting the Roadway column. . .");
                    Console.ReadLine();
                    if (Width <= 24) // select 20' roadway
                    {
                        Console.WriteLine("For ONE WAY: ");
                        Console.WriteLine("(a) Wheel = 150");
                        Console.WriteLine("(b) Track = +150");
                        Console.WriteLine("For TWO WAY: "); 
                        Console.WriteLine("(a) Wheel = +40");  
                        Console.WriteLine("(b) Track = +30");
                        Console.ReadLine();
                    }
                    if ((Width > 24) && (Width < 30)) //select 40 ft road with 18 percent reduction factor
                    {
                        Console.WriteLine("For ONE WAY: ");
                        Console.WriteLine("(a) Wheel = +123");
                        Console.WriteLine("(b) Track = +123");
                        Console.WriteLine("For TWO WAY: ");
                        Console.WriteLine("(a) Wheel = 123");
                        Console.WriteLine("(b) Track = +98.4");
                        Console.ReadLine();
                    }
                    if (Width >= 30)// Select 40 ft roadway
                    {
                        Console.WriteLine("For ONE WAY: ");
                        Console.WriteLine("(a) Wheel = 150");
                        Console.WriteLine("(b) Track = +150");
                        Console.WriteLine("For TWO WAY: ");
                        Console.WriteLine("(a) Wheel = +40");
                        Console.WriteLine("(b) Track = +30");
                        Console.ReadLine();