ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 26 May 2017 My Price 9.00

Ijeoma ChikwekwemStudent ID

Just exercise B. Use exercise A as reference(c code attach). C programming with comments! Thanks :)

 

/*----------------------------------------------------Name: Ijeoma ChikwekwemStudent ID: 8209468This program calculates the velocity and displacement ofan object moving at a constant velocity after a giventime t.------------------------------------------------------*/#include <stdio.h>#include <math.h>int main(void){//Variables declarationsdouble a,v0,t;double calculateVelocity(double v0, double a, double t);double calculateDisplacement(double v0, double a, double t);//initialize the variablesprintf("Please enter a time (sec.):\n");scanf("%lf",&t);printf("Please enter initial velocity (m/s):\n");scanf("%lf", &v0);printf("Please enter acceleration (m/s^2):\n");scanf("%lf",&a);//Printing the resultsprintf("\nResults:\nAfter time %.2f s, The velocity v=%3.2f (m/s) Thedistance x=%3.2f(m)\n",t,calculateVelocity(v0,a,t),calculateDisplacement(v0,a,t));return 0;}double calculateVelocity(double v0,double a,double t){double v;v=v0+a*t;return v;}double calculateDisplacement(double v0,double a,double t){double x;x=v0*t+0.5*a*t*t;return x;}

 

Attachments:

Answers

(11)
Status NEW Posted 26 May 2017 03:05 AM My Price 9.00

-----------

Not Rated(0)