assignment5.c - *Programmer Reymark R Rabanillo Instructor Aldrin P Obsanga*Class BSIT 1-1*Write a program that ask the user to enter the initial

assignment5.c - *Programmer Reymark R Rabanillo Instructor...

This preview shows page 1 out of 1 page.

/* *Programmer: Reymark R. Rabanillo Instructor: Aldrin P. Obsanga *Class: BSIT 1-1 * *Write a program that ask the user to enter the initial velocity and acceleration of an object, *and the time that has elapsed,places them in the variables u, a and t, and print the final velocity v, *and distance traversed s, using the following equation. * A. r = u + at * B. s = ut + 1/2 at^2 */ #include<stdio.h> #include<math.h> main(void) { double u,a,t,v,s; printf(" ***Final Velocity & Distance Traversed Calculator***\n\n"); printf("*
Image of page 1

Unformatted text preview: Enter initial velocity here : &quot;); scanf(&quot;%lf&quot;,&amp;u); printf(&quot;* Enter acceleration here : &quot;); scanf(&quot;%lf&quot;,&amp;a); printf(&quot;* Enter time here : &quot;); scanf(&quot;%lf&quot;,&amp;t); v = u + a * t; s = (u * t) + .5 * a * pow(t,2); printf(&quot;***********************************************************&quot;); printf(&quot;\n* *&quot;); printf(&quot;\n The final velocity is : %.2f \n&quot;,v); printf(&quot; The distance traversed is : %.2f \n&quot;,s); printf(&quot;* *\n&quot;); printf(&quot;***********************************************************&quot;); return 0; }...
View Full Document

  • Fall '18

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes