#include<stdio.h>
#include<math.h>
main()
{
double x,y;
int count;
count=1;
printf("Enter FIVE real value in a line\n");
read:
scanf("%lf",&x);
printf("\n");
if(x<0)
printf("value %d is negative\n",count);
else
{
y=sqrt(x);
printf("%lf\t%lf\n",x,y);
}
count=count+1;
if(count<=5)
goto read;
printf("End of computation");
}
#include<math.h>
main()
{
double x,y;
int count;
count=1;
printf("Enter FIVE real value in a line\n");
read:
scanf("%lf",&x);
printf("\n");
if(x<0)
printf("value %d is negative\n",count);
else
{
y=sqrt(x);
printf("%lf\t%lf\n",x,y);
}
count=count+1;
if(count<=5)
goto read;
printf("End of computation");
}
No comments:
Post a Comment