3. Write a program that reads in a continuous list of numbers, stopping when the user enters a negative. Once complete, the program should output the largest number received
#include<stdio.h>
main()
{
int n,min,int,max;
printf("enter as many numbers as you like ");
scanf("%d",&n);
printf("Enter the numbers:");
scanf("%d",&min);
max=min;
for(int=2;int<=n;int++)
scanf("%d",&min);
if(min>max)
max=min;
}
printf("The Largest Number is %d",max);
}
(num>0)
{
printf("It is a Positive number") ;
printf("It is a negative number") ;
}
return max num;
}
1
Expert's answer
2013-04-05T08:45:13-0400
Dear visitor Unfortunately, the statement of your question is a bit confusing. What do you need to be done? Please, give us the details so we could help you
Comments
Leave a comment