Professional Documents
Culture Documents
ASSIGNMENT 1
5 1) C Program to find maximum deflection and slope in a simply supported
25
3) C Program to find maximum deflection and slope in a Cantilever beam
with Uniformly Distributed Load
#include <stdio.h>
#include <math.h>
5
int main()
{
float W,L,E,I,max_def,max_slope;
printf("Enter the value of UDL in N/mm\n");
10 scanf("%f",&W);
printf("Enter the value of Length of the beam in mm\n");
scanf("%f",&L);
printf("Enter the value of Elastic modulus of beam in N/mm^2\n");
scanf("%f",&E);
15 printf("Enter the value of Moment of Inertia of beam in mm^4\n");
scanf("%f",&I);
max_def=(W*L*L*L*L)/(8.0*E*I);
max_slope=(W*L*L*L)/(6.0*E*I);
printf("Maximum deflection of the beam in mm is %f \n",max_def);
20 printf("Maximum slope of the beam in radians is %f \n",max_slope);
return 0;
}
OUTPUT
25