//program to calculate horizontal Distance and Reduced Level by tacheometry
#include <stdio.h>
#include <math.h>
void main()
{
float m,s,cosine,t,c,d,pi,v,h,hi,bm,rl,r;
printf("enter value of stadia intercept,theta,bench mark,central reading on bm,central reading on staff station");
printf("\n");
scanf("%f %f %f %f %f", &s, &t, &bm, &r, &h);
m=100; c=0;
pi=22.0/7.0;
cosine=cos(t*pi/180.0);
d=((m*s*pow(cosine,2))+(c*cosine));
v=d*tan(t*pi/180.0); hi=bm+r-v; rl=hi+v-h;
printf("distance=%f meters, vertival distance=%f meters,height of instrument=%f meters,reduced level=%f meters",d,v,hi,rl);
}
Above I have provided the program to calculate Horizontal distance and Reduced Level.
I have a question that after printing the answer that is 12th line in the image. Can I repeat the steps 8 to 12 again instead of restarting the program?
I am a beginner in C programming. So I am sorry if I didn't specified something important.