If the effective size of the soil to be drained is less than 0.05 mm, well points cannot be used because capillary forces prevent flow. In order to drain such soils suction head in excess of capillary head is to be applied i.e. by vacuum method. The typical soils of such nature are sands and silty sands. These soils possesses, coefficient of permeability between 1 ×10-3 to 1 ×10-5 cm/sec. Drainage in such cases can be made efficient by the use of vacuum well points as in Fig.1. Vacuum well…
Read MoreGames of Chance | Dice Game | Craps
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
/* Game of Craps */ #include <stdio.h> #include <stdlib.h> #include <conio.h> #include <time.h> /* contains prototype for function time */ /* enumeration constants represent game status */ enum Status { CONTINUE, WON, LOST}; int rollDice( void ); /* function prototype */ /* function main begins program execution */ int main( void ) { int sum; /* sum of rolled dice */ int myPoint; /* point earned */ enum Status gameStatus; /* can contain CONTINUE, WON, or LOST */ printf("\t\t\t\t\tWelcome to"); printf("\t\t\t\t\tGame of Craps"); delay(2000); clrscr(); printf("\t\t\t\t\tCoded By:"); printf("\t\t\t\t\twww.bestengineeringprojects.com"); delay(2000); clrscr(); /* randomize random number generator using current time */ srand( time( NULL ) ); sum = rollDice(); /* first roll of the dice */ /* determine game status based on sum of dice */ switch( sum ) { /* win on first roll */ case 7: case 11: gameStatus = WON; break; /* lose on first roll */ case 2: case 3: case 12: gameStatus = LOST; break; /* remember point */ default: gameStatus = CONTINUE; myPoint = sum; printf( "Point is %d\n", myPoint ); getch(); break; /* optional */ } /* end switch */ /* while game not complete */ while ( gameStatus == CONTINUE ) { sum = rollDice(); /* roll dice again */ /* determine game status */ if ( sum == myPoint ) { /* win by making point */ gameStatus = WON; /* game over, player won */ } /* end if */ else { if ( sum == 7 ) { /* lose by rolling 7 */ gameStatus = LOST; /* game over, player lost */ } /* end if */ } /* end else */ } /* end while */ /* display won or lost message */ if ( gameStatus == WON ) { /* did player win? */ printf( "Player wins\n" ); getch(); } /* end if */ else { /* player lost */ printf( "Player loses\n" ); getch(); } /* end else */ return 0; /* indicates successful termination */ } /* end main */ /* roll dice, calculate sum and display results */ int rollDice( void ) { int die1; /* first die */ int die2; /* second die */ int workSum; /* sum of dice */ die1 = 1 + ( rand() % 6 ); /* pick random die1 value */ die2 = 1 + ( rand() % 6 ); /* pick random die2 value */ workSum = die1 + die2; /* sum die1 and die2 */ /* display results of this roll */ printf( "Player rolled %d + %d = %d\n", die1, die2, workSum ); getch(); return workSum; /* return sum of dice */ } /* end function rollRice */ |
Click Here to download Compiled Software The output of the Program are shown in figure below:
Read MoreFinding the maximum of three integers | C programming
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
/* Finding the maximum of three integers */ #include <stdio.h> #include <conio.h> int maximum( int x, int y, int z); /* function prototype */ /* function main begains program execution */ int main( void ) { int number1; /* first integer */ int number2; /* second integer */ int number3; /* third integer */ printf("\t\t\t\t\tWelcome to"); printf("\t\t\t\t\tFinding Maximum of Three Integers Software"); delay(2000); clrscr(); printf("\t\t\t\t\tCoded By:"); printf("\t\t\t\t\twww.bestengineeringprojects.com"); delay(2000); clrscr(); printf( "Enter three integers\n " ); printf( "and this software tell you the maximum number: " ); scanf( "%d%d%d", &number1, &number2, &number3 ); getch(); /* number1, number2 and number3 are arguments to the maximum function call */ printf( "Maximum number is: %d\n", maximum( number1, number2, number3 ) ); getch(); return 0; /* indicates successful termination */ } /* end main */ /* Function maximum definition */ /* x, y and z are parameters */ int maximum( int x, int y, int z ) { int max = x; /* assume x is largest */ if ( y > max ) { /* if y is larger than max, assign y to max */ max = y; } /* end if */ if ( z > max ) { /* if z is larger than max, assign z to max */ max = z; } /* end if */ return max; /* max is largest value */ } /* end function maximum */ |
Click Here to Download Compiled Software The output of the Program are shown in figure below:
Read MoreComparing two number using if statements,Relational operators, and equality operators
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
/* Comparing two number using if statements,Relational operators, and equality operators */ #include <stdio.h> #include <conio.h> /* function main begins program execution */ int main( void ) { int num1; /* first number to be read from user */ int num2; /* second number to be read from user */ printf("\t\t\t\t\tWelcome to"); printf("\t\t\t\t\tComparing Software"); delay(2000); clrscr(); printf("\t\t\t\t\tCoded By:"); printf("\t\t\t\t\twww.bestengineeringprojects.com"); delay(2000); clrscr(); printf( "Enter two integers, you want to compare\n" ); printf( "and this software tell you the relationships they satisfy: " ); scanf( "%d%d", &num1, &num2 ); /* read two integers */ getch(); if ( num1 == num2 ) { printf( "%d is equal to %d\n", num1, num2 ); } /* end if */ if ( num1 != num2 ) { printf( "%d is not equal to %d\n", num1, num2 ); } /* end if */ if ( num1 < num2) { printf( "%d is less than %d\n", num1, num2 ); } /* end if */ if ( num1 > num2 ) { printf( "%d is greater than %d\n", num1, num2 ); } /* end if */ if ( num1 <= num2) { printf( "%d is less than or equal to %d\n", num1, num2 ); } /* end if */ if ( num1 >= num2 ) { printf( "%d is greater than or equal to %d\n", num1, num2 ); getch(); } /* end if */ return 0; /* indicate that program ended successfully */ } /* end function main */ |
Click Here to download Compiled Software The output of the Program are shown in figure below:
Read MoreDeep Well Pump
For very deep excavation the multistage well point set up has the disadvantage that the water level is pulled down abruptly at the edge of the excavation. As a consequence, the hydraulic gradient near the excavation bottom becomes quite large and the resulting seepage pressures may lead to the instability of the side slopes. Under such circumstances a deep well pump is suitable as shown in Fig.1. Deep wells pump are cased holes and generally they have diameters ranging from 30 cm to 60 Cm. The depth of deep well…
Read MoreWell Point System | Types of Well Point
What are the types of well point System? There are two types of well point system, namely single stage well point system and multi-stage well point system. These systems are briefly described in the following. Single Stage Well Point system – A well point consists of a pipe about 1 m long and 50 mm in diameter. It has perforations, which are covered with a screen to prevent clogging in. At the lower end, a jetting nozzle is provided. This nozzle also acts as a driving point. A ball valve…
Read MoreDrainage | Drainage from Open Sumps
What is drainage and where it is required? Drainage is required whenever it is desirable to eliminate seepage pressure or to reduce danger from frost damage or to increase shearing resistance of soil by reducing neutral stresses. These objectives are achieved by lowering the water table below the level of a mass of soil requiring protection. When the co-efficient of permeability exceeds 0.001 cm/sec drainage is essential. When value of coefficient of permeability lies between 0.001 to 0.00001 cm/sec drainage is inconsequential but it is required for stability of sides…
Read MoreAnchored Bulkhead | Determination of Anchored Bulkhead
What is anchored bulkhead? If tie rods or anchor rods are anchored close to the upper ends of sheet pile walls, the sheet pile walls are called bulkheads or anchored sheet pile walls. The tie or anchor rods are buried in the backfill at a considerable distance from the back of the wall. The ties or anchored rods reduce the lateral deflection, the bending moment and the depth of penetration. Anchored bulkhead are extensively used in water front structures. They are constructed by driving a row of sheet pile to…
Read MoreCantilever Walls in Cohesive Soils
The pressure distribution on a cantilever wall constructed on cohesive soil is shown in Fig.1 below. The active pressure at any depth z can be expressed as: Where, = Vertical pressure, Z = Depth from surface to backfill The passive pressure at any depth y below the dredge line may be expressed as: The active earth pressure on the wall from the backfill surface to the dredge level is shown in the Fig.1. The soil is in tension up to a depth of z0 and pressure in the wall is…
Read MoreSimplified Method of Structures of Cantilever Sheet Pile Walls
What are the Simplified Method of Structures of Cantilever Sheet Pile Walls? The exact method involves the solution of fourth order equation, which is quite laborious. For practical problems simplified method of structure of cantilever sheet pile walls is generally used. In the simplified method the passive pressure is replaced by concentrated load acting at the bottom of the pile. The simplified method arrangement is shown in Fig,1 above. Taking moments of all the forces about the base of the pile we get, ——— (1) Hence, ———- (2) The solution…
Read More