Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #107.73K
1 Posted Topic
void main() { float* a; int n,i,max=0; printf("Enter number of elements to find the maximum\n"); scanf("%d",&n); a=malloc(sizeof(float)*(n+1)); for(i=0;i<n;i++) { printf("Enter number %d\n",i+1); scanf("%f",&a[i]); } max=a[0]; for (i=1;i<n;i++) { if (max<a[i]) { max=a[i]; } } printf("The maximum number is \n%d\n\n",max); }
The End.
arunkumar4003