Friday, July 11, 2014

UNIVERSITY OF ALLAHABAD

MCA Semester VI:
  1. Mobile Computing and Applications (MCA-601)
  2. Elective: Cloud Computing, E-commerce & Cyber laws/ High Performance Computing/Human Computer Interaction/ Application Development on Hand-held devices/ Computer Animation/Natural Language Processing/Computer Vision/Artificial Neural Networks/Fuzzy Systems (MCA-602)
Lab.: MAIN PROJECT

COMPREHENSIVE VIVA

Tuesday, July 1, 2014

COMPUTE AREA OF TRIANGLE

// To evaluate and display the area of the triangle whose sides are given.


#include
#include
#include
void main()
{
float area,s,s1,s2,s3;
clrscr();

printf("\nPlease enter the three sides of triangle:\n");
scanf("%f%f%f",&s1,&s2,&s3);
s = (s1+s2+s3)/2;
area = s*(s-s1)*(s-s2)*(s-s3);
printf("\nThe area of the triangle is %f",sqrt(area));
getch();
}