Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  jeito_porco
Language: C/C++
Code:
#include <stdio.h>
int main()
{

double sf,t;
int vi,a,i;

t=0.;
sf=0.;
t=0;
vi=2;
a=1;

for (i=0;i<3;i++){
t=i-0.5;
sf = vi*t+(1/2)*a*t*t;
sf1 = vi*i+(1/2)*a*i*i;

cout << "t: " << t << " sf: " << sf << endl;
cout << "i: " << i << " sf1: " << sf1 << endl;
}
     return 0;
}
          
Comments: