SCHOOL OF CODE BUILDERS
Learn To CODE. Become A DEVELOPER.
Pages
HOME
DATA STRUCTURES
STRINGS
ARRAYS
MATRIX
BINARY TREES
LINKED LIST
STACK
QUEUE
SORTING
SEARCHING
C
PYTHON
PSEUDOCODE
CONTEST PROBLEMS
ALGORITHMS
PATTERNS
PHP
C PUZZLES
C INTERVIEW QUESTIONS
JAVA
C++
HASHING
RECURSION
BASIC C PROGRAMS
TCS-CODEVITA
FACEBOOK
CONTACT US
C program to calculate area of scalene triangle
C program to calculate area of scalene triangle
Output:
Enter value of the base : 5
Enter value of the height: 2
Area of scalene triangle is 5.000000
Implementation:
#include
int main(void) { float base,height; float area; printf("Enter value of the base :\n"); scanf("%f",&base); printf("Enter value of the height:\n"); scanf("%f",&height); /* calculating the area of scalene triangle height * base Area = ------------- 2 */ area = (height * base)/2; printf("Area of scalene triangle is %f",area); return 0; }
PREVIOUS
NEXT
HOME