Lab Assignment 4
Lab Assignment 4
Lab Assignment 4 :
AIM:
To derive the test cases for a program that reads three integer values from an input
dialog. The three values represent the length of the sides of the triangle. The program displays a
message that states whether the triangle is scalene, isosceles or equilateral.
4. A test case with three integers greater than zero such that sum of two integers should
be less than the third integer.
7. A test case with three integers greater than zero such that sum of two is equal to third.
8. Test cases for all three permutations where the length of one side is equal to the sum of
the lengths of other two sides.
PROGRAM
#include<stdio.
h>
#include<conio
.h> void main()
{
float a,b,c;
float
k=0,l,m;
clrscr();
printf("Enter the value of a b c\
n"); scanf("%f%f%f",&a,&b,&c);
k=a+b;
l=b+
c;
m=c
+a;
if((k>c) && (l>a) && (m>b)) {
}
else
}}
{
printf("invalid triangle");
}
getch();
}
RESULT:
Thus the test cases for triangle program are successfully executed.
Vaishnavi G
MCA II Semester - Software Testing
Registration Number: EA2132251010004