TAB

One of the works done by our Robotics and Machine Learning division,
SELF-LEVELING QUADCOPTER
Arduino based Quadcopter.
Self-leveling is acheived by the aligning the quadcopter using the readings from the gryo as well as the accelerometer.
A four channel RC transmitter is used to control the movement of the quadcopter when in flight. Kindly subscribe to our YouTube Channel and stay tuned.

Friday 22 January 2016

Practice Problem 1 (20-1 to 27-1) : SPEED CONVERSION

#include<stdio.h>
#include<math.h>
void main()
{
int m;
float s;
scanf("%d",&m);
scanf("%f",&s);
int time;
time=m*60;
time+=(int)(s+0.5);
float fps=5280.0/time;
fps=roundf(fps*100)/100;
float mps=1609.34/time;
mps=roundf(mps*100)/100;
printf("%.2f fps\n",fps);
printf("%.2f mps",mps);
}

2 comments:

  1. the expected output is 22.00 fps but our output is 22 fps what should we do to rectify it.

    ReplyDelete
  2. yes the problem was updated..when i solved it the output was in that format ..So just replace the last 8 line of output with just 2 lines

    printf("%.2f fps",fps);
    printf("%.2f mps",mps);

    ReplyDelete