Total Pageviews

Program of Boundary Value Analysis

#include<stdio.h>
#include<conio.h>
void main()
{
int m,min,max,mid,i,j,k,n,x[5],s=65;
clrscr();
printf("Enter the number of variable:");
scanf("%d",&n);
printf("\nEnter the minimum limit :");
scanf("%d",&min);
printf("Entert the Maximum limit :");
scanf("%d",&max);
mid=(min+max)/2;
x[0]=min;
x[1]=++min;
x[2]=mid;
x[4]=max;
x[3]=--max;
for(i=0;i<n;i++)
{
printf("\t%c",s++);
}
printf("\n\n");
for(i=0;i<n;i++)
{
m=i;
s=0;
for(j=0;j<5;j++)
{
if(i>0 && x[s]==mid)
{
s++;
j++;
}
for(k=0;k<n;k++)
{
if(m==i&&m==k)
{
printf("\t%d",x[s]);
s++;
}
else
{
printf("\t%d",mid);
}
}
printf("\n");
}
}
getch();
}

No comments:

Post a Comment