Sunday, September 23, 2012

Program 1 Distance Travelled


#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
float U,A,T,distance,a,b;
clrscr();
printf("enter value of U:-");

scanf("%f",&U);
printf("enter value of A:-");
scanf("%f",&A);
printf("enter value of T:-");
scanf("%f",&T);
a=A*T;
b=pow(a,2);
distance=(U*T)+(b/2);
printf("your total distance is %f",distance);

getch();
}

No comments:

Post a Comment