SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
Computer Applications in Civil Engineering Lab
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
Experiment-1
Aim :A C++ program to determine the distribution of flow in a pipe network using Hardy Cross .
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
int x,L,P,C,i;
float Q,D[50],f[50],F[50],V[50],Sh,Rh,H1,H2,h1,h2,j,J,Fl,fr,FL,B,k,b,H;
cout<<"determination of supply head and residual head of pipe flow \n\n";
cout<<"enter the total length of pipe in mtr.(multiplication of 500)\n\n";
cin>>L;
P=(L/500)-1;
cout<<"total no.of joint of pipe required of 500 mtr.length is ="<<P<<"\n\n";
C=P+1;
cout<<"total no.of changed dia.pipe is ="<<C<<"\n\n";
cout<<"enter the pipe discharge in m3/s \n\n";
cin>>Q;
for(i=1;i<=C;i++)
{
cout<<"enter the value of dia.of "<<i<<" section \n\n";
cin>>D[i];
V[i]=(Q*4)/(3.14*pow(D[i],2));
}
cout<<"calculation of enlargement and contraction losse \n\n";
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
H1=0;
H2=0;
for(i=1;i<C;i++)
{
if(D[i]<D[i+1])
{
cout<<"loss due to enlargement occur\n\n";
h1=(pow((V[i]-V[i+1]),2))/(2*9.81);
H1=H1+h1;
cout<<"total loss due to enlargement in mtr.is ="<<H1<<"\n\n";
}
else
{
cout<<"loss due to contraction occur\n\n";
h2=(0.5*pow(V[i+1],2))/(2*9.81);
H2=H2+h2;
cout<<"total loss due to contraction in mtr.is ="<<H2<<"\n\n";
}
}
cout<<"calculation of joint loss\n\n";
J=0;
for(i=1;i<=P;i++)
{
cout<<"enter the value of coefficient k \n\n";
cin>>k;
j=(k*pow(V[i+1],2))/(2*9.81);
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
J=J+j;
}
cout<<"total joint loss in mtr.is ="<<J<<"\n\n";
cout<<"calculation of bend loss\n\n";
B=0;
for(i=1;i<=P;i++)
{
cout<<"enter the value of coefficient k \n\n";
cin>>k;
b=(k*pow(V[i+1],2))/(2*9.81);
B=B+b;
}
cout<<"total bend loss in mtr.is ="<<B<<"\n\n";
cout<<"calculation of friction loss\n\n";
FL=0;
for(i=1;i<=C;i++)
{
cout<<"enter the value of friction coefficient f \n\n";
cin>>fr;
Fl=(fr*500*V[i]*V[i])/(2*9.81*D[i]);
FL=FL+Fl;
}
cout<<"total friction loss in mtr.is ="<<FL<<"\n\n";
H=H1+H2+J+B+FL;
cout<<"total head loss in mtr.="<<H<<"\n";
cout<<"Press 1 for Residual head of Reservoir \n";
cout<<"Press 2 for Supply head of Reservoir\n";
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
cin>>x;
switch(x)
{ case 1:
cout<<"enter the supply head of reservoir in mtr.\n";
cin>>Sh;
Rh=Sh-H;
cout<<"The Residual head of Reservoir in mtr.is="<<Rh<<"\n";
break;
case 2:
cout<<"enter the residual head of reservoir in mtr.\n";
cin>>Rh;
Sh=Rh+H;
cout<<"The Supply head of Reservoir in mtr.is="<<Sh<<"\n";
}
getch();
}
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
Experiment-2
Aim: : A C++ program for the computation of friction factor of a circular pipe.
#include<iostream.h>
#include<conio.h>
#include<math.h>
fric()
{
char cho;
do
{
clrscr();
double d,v,k,kr,f=0,re;
int ch;
cout<<"\t\t A programe for friction coefficient\n";
cout<<"\nEnter the diameter of pipe in m \n";
cin>>d;
cout<<"\nEnter the velocity of pipe in m/s\n";
cin>>v;
cout<<"\nEnter the kinematic viscosity in stokes\n";
cin>>k;
k=k*.0001;
re=(v*d)/k;
cout<<"\nReynold no is "<<re<<"\n";
if(re<2000)
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
{
f=64/re;
cout<<"\nFlow is laminar\n";
cout<<"\nValue of friction cofficient f = "<<f;
}
else if(re>4000)
{
cout<<"\n1 for smooth pipe\n2 for rough pipe\n";
cin>>ch;
switch(ch)
{
case 1:
if(4000<re && re<100000)
{
f=(.316/(pow(re,.25)));
cout<<"\nFlow is turbulent\n";
cout<<"\nValue of friction cofficient f = "<<f;
}
else if(re>100000 && re<400000)
{
f=.0032+(.221/(pow(re,.237)));
cout<<"\nFlow is turbulent\n";
cout<<"\nValue of friction cofficient f = "<<f;
}
break;
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
case 2:
f=(1/(pow((2*log10(re/k)+1.74),2)));
cout<<"\nFlow is turbulent\n";
cout<<"\nValue of friction cofficient f = "<<f;
break;
}
}
else
cout<<"\nFlow is transition\n";
cout<<"\n\n\n\t\t Do you want to continue\n";
cin>>cho;
}while(cho=='y' || cho=='Y');
return 0;
}
void main()
{
fric();
getch();
}
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
Experiment -3
Aim: A C++ program for network analysis and determination of critical path of a CPM network
// A PROGRAM FOR CPM NETWORK ANALYSIS //
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
void main()
{
//input data
int i,j,evn,act,H[20],T[20],TL[20];
float t[20];
clrscr();
cout<<"Enter the no. of events";
cin>>evn;
cout<<"\nEnter the no. of activities in network";
cin>>act;
for(i=1;i<=act;i++)
{
cout<<"\nEnter the tail event of activity no. "<<i<<" ";
cin>>T[i];
cout<<"\nEnter the head event of activity no. "<<i<<" ";
cin>>H[i];
cout<<"\nEnter the duration of activity no. "<<i<<" ";
cin>>t[i];
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
}
float TE[20],temp;
int count;
TE[1]=0;
for(i=2;i<=evn;i++)
{
count=1;
for(j=1;j<=act;j++)
{
if(H[j]==i)
{
TE[i]=TE[T[j]]+t[j];
if(count==1)
{
temp=TE[i];
count++;
}
else if(TE[i]>temp)
temp=TE[i];
}
}
TE[i]=temp;
}
//computation of latest event time
TL[evn]=TE[evn];
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
for(i=evn-1;i>=1;i--)
{
count=1;
for(j=1;j<=act;j++)
{
if(T[j]==i)
{
TL[i]=TL[H[j]]-t[j];
if(count==1)
{
temp=TL[i];
count++;
}
else if(TL[i]<temp)
{
temp=TL[i];
}
}
}
TL[i]=temp;
}
//computation of float
float TF[20],FF[20],INTF[20],INDF[20];
for(i=1;i<=act;i++)
{
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
TF[i]=TL[H[i]]-TE[T[i]]-t[i];
FF[i]=TE[H[i]]-TE[T[i]]-t[i];
INDF[i]=TE[H[i]]-TL[T[i]]-t[i];
INTF[i]=TF[i]-FF[i];
}
//output
cout<<"Event time:-\n";
cout<<"EVENT"<<setw(4)<<"TE"<<setw(4)<<"TL";
for(i=1;i<=evn;i++)
{
cout<<endl;
cout<<setw(3)<<i<<setw(6)<<TE[i]<<setw(4)<<TL[i];
}
cout<<endl<<endl<<"ACTIVITY TIME & FLOAT VALUE:-"<<endl<<endl;
cout<<"ACTIVITY"<<setw(10)<<"DURATION"<<setw(4)<<"TF"<<setw(4)<<"FF"<<setw(6)<<"INDF"<<setw(6)<<"TNTF";
for(j=1;j<=act;j++)
{
cout<<endl;
cout<<setw(3)<<T[j]<<"-"<<H[j]<<setw(9)<<t[j]<<setw(8)<<TF[j]<<setw(4)<<FF[j]<<setw(5)<<INDF[j]<<setw(6)<<INTF[j]<<endl;
}
//determination of critical path
count=1;
for(i=1;i<=act;i++)
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
{
if(TF[i]==0)
{
if(count==1)
{
cout<<T[i]<<"-"<<H[i];
count++;
}
else
cout<<"-"<<H[i];} }getch();}
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
Experiment-4
A C++ program for determination of vertical effective stress at a given depth for any soil profile and water table conditions
UNIT 3// A program for determination of effective stress //
#include<iostream.h>
#include<conio.h>
void main()
{
int n;
float Dw,thk[10],ysat[10],y[10];
int i;
float depth=0,q;
clrscr();
cout<<"\n Enter the number oflayers in the soil mass";
cin>>n;
for(i=1;i<=n;i++)
{
cout<<"\nEnter the effective depth of"<<i<<"th layer (m)";
cin>>thk[i];
}
cout<<"\n Enter the depth of water table below ground below (m)";
cin>>Dw;
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
cout<<"\n Enter the surcharge load acting on ground surface (KN/m2)";
cin>>q;
for(i=1;i<=n;i++)
{
depth+=thk[i];
if(depth-thk[i]>=Dw)
{
cout<<"\n Enter the saturated unit weight of"<<i<<"th soil layer (kN/m3)";
cin>>ysat[i];
y[i]=0;
}
else
{
if(depth<=Dw)
{
cout<<"\n Enter the bulk unit weight of"<<i<<"th soil layer(kN/m3)";
cin>>y[i];
ysat[i]=0;
}
else
{
cout<<"\n Enter the bulk weight of"<<i<<"th soil (kN/m3)";
cin>>y[i];
cout<<"\n Enter the saturated unit weight of"<<i<<"th soil layer(kN/m3)";
cin>>ysat[i];
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
}
}
}
//computation of effective stress
float h, stress;
int npts;
cout<<"\n Enter the number of points at which effective stress is to be calculated";
cin>>npts;
for(i=1;i<=npts;i++)
{
cout<<"\n Enter the"<<i<<"th depth at which effective stress is to be calculated";
cin>>h;
float depth=0,stress=0;
for(i=1;i<=n;i++)
{
depth=depth+thk[i];
if(h>=depth)
{
if(Dw<depth && Dw>depth-thk[i])
stress= stress+y[i]*(Dw-depth-thk[i])+ysat[i]*(depth-Dw)-9.81*(depth-Dw);
if(Dw>=depth)
stress+=y[i]*thk[i];
if(Dw<=depth-thk[i])
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
stress+=ysat[i]*thk[i]-9.81*thk[i];
}
if(h<depth && depth-h<thk[i])
{
if(Dw<depth && Dw>depth-thk[i])
{
if(Dw>=h)
stress+=y[i]*(h-depth+thk[i]);
else
stress+=y[i]*(Dw-depth+thk[i])+ysat[i]*(h-Dw)-9.81*(h-Dw);
}
if(Dw>=depth)
stress+=y[i]*(h-depth+thk[i]);
if(Dw<=depth-thk[i])
stress+=ysat[i]*(h-depth+thk[i])-9.81*(h-depth+thk[i]);
}
}
cout<<"\n Effective stress at"<<i<<"th point (kN/m2):"<<stress+q;
}
getch();
}
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
Experiment-5
Aim: C++ program for determination of bearing capacity of soil for given soil and water table conditions.
// A PROGRAM FOR THE DETERMINATION OF ULTIMATE BEARING CAPACITY OF SOIL //
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
float yav,q,Zw1,ysat,Zw2,Rw1,Rw2,Df,B,c,y,Dw,Nc,Nq,Ny;
cout<<"\n Enter the depth of ebedent of footing(m)";
cin>>Df;
cout<<"\n Enter the width of footing(m)";
cin>>B;
cout<<"\n Enter the effective cohesion of soil(Kn/sqm)";
cin>>c;
cout<<"\n Enter the unit weight of soil(Kn/cum)";
cin>>y;
cout<<"\n Enter the saturated unit weight of soil(Kn/cum)";
cin>>ysat;
cout<<"\n Enter the depth of water table";
cin>>Dw;
cout<<"\n Enter the bearing capacity factor \n Nc ";
cin>>Nc;
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
cout<<"\n Nq ";
cin>>Nq;
cout<<"\n Ny ";
cin>>Ny;
Zw1=Dw;
if(Zw1<Df || Zw1==Df)
{
Rw1=.5*(1+(Zw1/Df));
}
else
{
Rw1=1;
}
Zw2=Dw-Df;
if(Zw2<B || Zw2==B)
{
if(Zw2>0)
{
Rw2=.5*(1+(Zw2/B));
yav=((y*Zw2)+(ysat*(B-Zw2)))/B;
}
else
{
Zw2=0;
Rw2=.5*(1+(Zw2/B));
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
yav=ysat;
}
}
else
{
Rw2=1;
yav=y;
}
if(Dw<Df && Dw!=0)
{
y=((y*Dw)+(ysat*(Df-Dw)))/(Dw+(Df-Dw));
}
else if(Dw==0)
{
y=ysat;
}
else
{
y=y;
}
q=(c*Nc)+(y*Df*Nq*Rw1)+(.5*B*yav*Ny*Rw2);
cout<<"Bearing capacity of soil is= "<<q<<"kN/sqm";
getch();
}
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
Experiment-6
A C++ program for determination of horizontal and vertical hydraulic conductivities for flow through
anisotropic soils.
A PROGRAM FOR DETERMINATION OF RL OF POINTS BY HI METHOD //
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
int no_s,n_tp,i,j,st_tp[20];
float RL[20],BS,FS,IS,HI;
cout<<"\n Enter the no. of station";
cin>>no_s;
cout<<"\n Enter the no. of turning point";
cin>>n_tp;
for(i=1;i<=n_tp;i++)
{
cout<<"\n Enter the station no of "<<i<<" turning point";
cin>>st_tp[i];
}
for(i=1;i<=no_s;i++)
{
if(i==1)
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
{
cout<<"\n Enter the RL of the BM";
cin>>RL[i];
cout<<"\n Enter the BS at station no."<<i<<" : ";
cin>>BS;
HI=RL[i]+BS;
}
if(i!=1 && i!=no_s)
{
for(j=1;j<=n_tp;j++)
{
if(i==st_tp[j])
{
cout<<"\n Enter the FS at station no. "<<i<<" : ";
cin>>FS;
RL[i]=HI-FS;
cout<<"\n Enter the BS at station no. "<<i<<" : ";
cin>>BS;
HI=RL[i]-BS;
goto end;
}
}
cout<<"\n Enter the IS at station no. "<<i<<" : ";
cin>>IS;
RL[i]=HI-IS;
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
}
if(i==no_s)
{
cout<<"\n Enter the FS at station no. "<<i<<" : ";
cin>>FS;
RL[i]=HI-FS;
}
end:
}
for(i=1;i<=no_s;i++)
{
cout<<"\nRL of "<<i<<"POINT = "<<RL[i];
}
getch();
}
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
Experiment-7
A C++ program for computation of SF & BM at any desired section of a simply supported beam for any .
loading conditions. UNIT 4 SF AND BM
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
float w[20],x[20],l,RA,RB,p,t,BM;
int n,i;
clrscr();
cout<<"\t\t ****SHEAR FORCE AND BENDING MOMENT****\n\n");
cout<<"Length of Beam l= "<<"\n\t";
cin>>l;
cout<<"\n\tEnter the no.of points loads n ="<<"\n\t";
cin>>n;
for(i=1;i<=n;i++)
{
cout<<"\n\tEnter the value of loads w= "<<"\n";
cout<<"\t";
cin>>w[i];
}
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
for(i=1;i<=n;i++)
{
cout<<"\n\tEnter the positions of loads from A x= "<<"\n";
cout<<"\t";
cin>>x[i];
}
p=0;
for(i=1;i<=n;i++)
{
p=p+w[i];
}
cout<<"\tTotal magnitude of loads = "<<p<<"\n";
t=0;
for(i=1;i<=n;i++)
{
t=t+(w[i]*x[i]);
}
RB=t/l;
RA=p-RB;
for(i=1;i<=n;i++)
{
if(i==1)
{
BM=(RA*x[i]);
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
}
else
{
for(int j=1;j<=i-1;j++)
{
if(j==1)
{
BM=(RA*x[i])-(w[j]*(x[i]-x[j]));
}
else
{
BM=BM-(w[j]*(x[i]-x[j]));
}
}
}
cout<<"\n\tBending Moments at "<<" point"<<i<< "="<<BM<<"Kn-M \n";
}
cout<<"\tS.F. at A (RA) =";
cout<<RA<<"\n";
cout<<"\tS.F. at B (RB) =";
cout<<RB;
}
getch();
}
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
Experiment -8
A C++ program for design of simply supported RCC beam
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr ();
float Q,b,S,Z,n,R,s,P,x,m,y,N,temp;
cout<<"enter discharge in m^3/s = ";
cin>>Q;
cout<<"\nenter bed width in m = " ;
cin>>b;
cout<<"\nenter bed slope in decimal = ";
cin>>S;
cout<<"\n enter mannings constant = ";
cin>>N;
cout<<" \n side slope vertical = ";
cin>>m;
for(y=0;y<20;y=y+.01)
{ R=((b+m*y)*y)/(b+2*y*pow((m*m+1),.5));
Z=pow(R,.667)*(b+m*y)*y;
temp=(Q*N)/pow(S,.5);
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
x=Z-temp;
if(x<=.01)
P=y;}
cout<<" normal depth of trapozoidal = " <<P <<" m ";
getch();}
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
Experiment-9
Aim: A C++ program for design of RCC column. #include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr ();
float p,w,Xcc,Xsc,d,Ast,Ag,Ab;
int i,b,n,j,D;
cout<<"enter the load on column in KN ";
cin>>w;
cout<<"\nenter the permissible strees in steel N/sqmm ";
cin>>Xsc;
cout<<"\nenter the permissible strees in concrete N/sqmm";
cin>>Xcc;
cout<<"enter the percentage of steel";
cin>>p;
cout<<" %";
p=p/100;
Ag=(w*1000)/((Xcc*(1-p))+(p*Xsc));
Ast=p*Ag;
b=pow(Ag,.5);
cout<<"\narea of steel = "<<Ast<<" mm^2\n";
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha
SHRI RAWATPURA SARKAR INSTITUTE OF TECHNOLOGY,NEW RAIPUR (C.G.)
cout<<"\nenter dia of main bar in mm\n";
cin>>D;
Ab=(3.14*D*D)/4;
n=Ast/Ab;
cout<<"\nenter the dia of tie bar in mm";
cin>>d;
cout<<"\ngroosse area of col. = "<<Ag<<" mm^2\n";
cout<<"\nreq. width of col.= "<<b<<" mm ";
i=(b%50);b=b-i;if(i==0)b=b;
else
{b=b+50;}cout<<" say= "<<b<<" mm";
cout<<"\ndia of main bar in mm = "<<D<<"\n" ;
cout<<"\nreq no. of main bar = "<<n+1<<"\n";
cout<<"\ndia of tie of main bar= "<<d<<" mm\n ";
if(b<(16*d)&&(b<48*d))
j=b;
else if((16*d)<(48*d))
j=(16*D);
else
j=(48*d);cout<<"spacing of tie bar = "<<j;
i=(j%10);j=j-i;cout<<" say= "<<j<<" mm c\c";
getch();}
CIVIL/6th/CACP Lab/Prepared by Vivek Kumar Sinha