Let's take a look at the passing prawns ~, Thank you ~~~~

Source: Internet
Author: User
Let's take a look at the passing prawns ~, Thank you ~~~~ -- Linux general technology-Linux programming and kernel information. The following is a detailed description. The program is like this. Find the maximum and minimum numbers among the 10 numbers and display their locations. I wrote it like this:
/* Locate the positions of the maximum and minimum numbers in 10 numbers */
# Include "stdio. h"
Int main (void)
{
Int a [10] = };
Int max =-32768, min = 32767, I = 0;
For (I = 0; I <10; I ++)
{
If ( > Max)
Max =;
If ( Min =;
}
Printf ("max = % d \ n", max );
Printf ("min = % d \ n", min );
Return 0;
} Now the program can find the maximum and minimum numbers. The maximum number of 9 here is 7th bits, and the minimum number of 0 is 9th bits,
How can we point out the location where 9 and 0 are located?
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.