#include <stdlib.h>
#include<math.h>
int main()
{
int arr[5],i,square_root;
printf("Please enter a five number of an array:");
for(i=0; i<5; i++)
{
scanf("%d",&arr[i]);
}
printf("\nThe square if the stored array is:");
for(i=0; i<5; i++)
{
printf("%d ",arr[i]*arr[i]);
}
printf("\nThe square root of The array is:");
for(i=0; i<5; i++)
{
square_root= sqrt(arr[i]*arr[i]);
printf("%d ",square_root);
}
return 0;
}
No comments:
Post a Comment