Traditional Culture Encyclopedia - Traditional culture - The number 10 entered in C language requires the maximum number to be printed. How to express it with traditional flow chart?
The number 10 entered in C language requires the maximum number to be printed. How to express it with traditional flow chart?
# include & ltstdio.h & gt
# Definition number 10
# define MAX(x, y) ((x)>(y)? (x):(y)) // Returns the larger of two numbers?
int main(void)
{
int num,i= 1,max
Printf ("Enter number: \ n");
scanf("%d ",& ampnum); //Enter the first number?
Max = num// Assign the first number to max?
for(I = 1; I & ltn;; i++)
{
? scanf("%d ",& ampnum); ? //Enter the other 9 digits?
? max = MAX(max,num); //Assign the maximum value to max?
}
printf("max = %d\n ",max); //Print out max?
Returns 0;
}
- Previous article:What kind of wood is ebony?
- Next article:Appreciation and introduction of ceramic decorations
- Related articles
- Why do houses in different regions have different architectural styles?
- Wearing Hanfu is a new fashion!
- Casting net process
- What gift should I bring home for the Spring Festival?
- How about Shenzhen Zhanhong Craft Products Co., Ltd.?
- What folk toys are there?
- Which institution should I go to when applying for a patent?
- Is business difficult now?
- Lou traditional Chinese medicine clinic [clinical features]
- Definition of data message