-->

solution5

// program to get ‘S’ using given formula
#include<stdio.h>
#include<conio.h>
void main()
{
float u,t,a;
float s;
printf(“enter  value of ‘u’\n”);
scanf(“%f”,&u);
printf(“please enter value of ‘t’\n”);
scanf(“%f”,&t);
printf(“please enter value of ‘a’\n”);
scanf(“%f”,&a);
s=u*t+(1.0/2.0)*a*t*t;
printf(“the value=%f\n”,s);
getch();

}

solution4

// program to get area of triangle
#include<stdio.h>
#include<conio.h>
void main()
{
float base,height;
float area;
printf(“enter base and height of triangle\n”);
scanf(“%f%f”,&base,&height);
area=0.5*base*height;
printf(“the area is=%f\n”,area);

getch();
}

solution3


// program to get volume of sphere
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
float radius;
float volume;
printf(“enter radius of sphere\n”);
scanf(“%f”,&radius);
volume=4.0*3.14*(pow(r,3))/3.0;   // the pow() function exits inside "math.h"
printf(“the volume is=%f\n”,volume);
getch();
}

you did not understand how it works! follow the “C” learning part/section (coming soon).

solution2


// program to get area and perimeter of rectangle
#include<stdio.h>
#include<conio.h>
void main()
{
float l,b;
float area,perimeter;
printf(“enter length and breadth of rectangle\n”);
scanf(“%f%f”,&l,&b);
area=l*b;
perimeter=2*(l+b);
printf(“the area is=%f\n”,area);
printf(“the perimeter=%f\n”,perimeter);
getch();
}
you did not understand how it works! follow the “C” learning part/section (coming soon).