The total distance travelled by vehicle in 't' seconds is given by distance = ut+1/2at^2 where 'u' and 'a' are the initial velocity (m/sec.) and acceleration (m/sec2).
Write C program to find the distance travelled at regular intervals of time given the values 'u' and 'a'.
The program should provide the flexibility to the user to select his own time intervals and repeat the calculations for different values of 'u' and 'a'.
#include<stdio.h> main() { int a,u,t,t1,t2,i; float s; clrscr(); printf("ENTER THE VALUES OF a,u,t,t1,t2:"); scanf("%d%d%d%d%d",&a,&u,&t,&t1,&t2); for(i=t1;i<=t2;i=i+t) { s=(u*i)+(0.5*a*i*i); printf("\n\nthe distance travelled in %d seconds is %f ",i,s); } getch(); }
Write a C program to print the following pattern output.
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
Write short notes on the following :
a) BFS
b) Tail recursion
What is Weak entity set? Explain with suitable example.
Write a C procram to G.C.D. of two no. using recursion.
What is linear searching?
Write a C program to find factorial(using recursion) of any no.
What is “Top-Down and Bottom-Up Design” approach?