Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ The array of C language     - Shell script to delete empty folders recursively (Linux)

- Oracle 10g New Features - Archive Compression (Database)

- Oracle Shared Server Configuration (Database)

- Appweb configuration in detail (Server)

- Let you Fun Ubuntu desktop eleven weapon (Linux)

- CentOS 6.5 boot automatically mount the hard drive (Linux)

- Boost - Memory Management - smart pointers (Programming)

- HAProxy Windows version of the compiler and its application in the CORS (Server)

- How to fix Ubuntu / Mint can not add PPA source of error (Linux)

- GlusterFS distributed storage deployment (Server)

- Security Knowledge: redirection command application security (Linux)

- CentOS yum source configuration (Linux)

- Configuring the PXE server in Ubuntu 14.04 (Server)

- Elaborate 10-point difference between the new and malloc (Programming)

- Teamviewer not start in Linux (Linux)

- The Linux role of each directory contents (Linux)

- How to allow users to access only a specific database (MSSQL) (Database)

- MySQL database under Linux to achieve automatic backup scheduled backup day (Database)

- Nginx1.8 version upgrade method AMH4.2 Free manually compile (Server)

- Nginx logging client ip (Server)

 
         
  The array of C language
     
  Add Date : 2018-11-21      
         
         
         
  A one-dimensional array of C language

1, find the maximum and minimum values of a number of

     int age [5];
     float sum = 0;
    
     printf ( "Please enter the five integers: \ n");
     for (int i = 0; i <5; i ++) {
         scanf ( "% d", & age [i]);
     }
     int min = age [0];
     int max = age [0];
    
     for (int i = 1; i <5; i ++) {
         sum = sum + age [i];
         if (age [i]> max) {
             max = age [i];
         }
         if (age [i]              min = age [i];
         }
     }
     printf ( "max =% d \ n", max);
     printf ( "min =% d \ n", min);

2. Bubble Sort

  int arr [5] = {1,5,9,3,4}, t;
     for (int i = 0; i <4; i ++) {
         for (int j = 0; j <4-i; j ++) {
             if (arr [j]> arr [j + 1]) {
                 t = arr [j];
                 arr [j] = arr [j + 1];
                 arr [j + 1] = t;
             }
         }
     }
    
     for (int i = 0; i <5; i ++) {
         printf ( "% d \ t", arr [i]);
     }
     
         
         
         
  More:      
 
- Linux configuration startup mount: fstab file (Linux)
- Oracle 11g RAC automatically play GI PSU patch (11.2.0.4.8) (Database)
- CoreOS quick installation to get started on a PC (Linux)
- How to enable curl command HTTP2 support (Linux)
- Open log in Hibernate (Programming)
- jQuery update the content and method of use 3.0 (Programming)
- Oracle 12C RAC optimizer_adaptive_features cause of data into overtime (Database)
- Puppet 3.x installed on Debian 7 (Server)
- Cacti installation deployment under CentOS 6.6 (Server)
- MySQL related statements (CRUD) (SQLyog software) (Database)
- SecureCRT session buffer size settings (Linux)
- Gentoo: startx appeared Failed to load module Problem Solving (Linux)
- Java semaphores (Programming)
- Story timestamp and time zones: daily programmer (Programming)
- Ubuntu 14.04 LTS installed Hadoop 1.2.1 (distributed cluster mode) (Server)
- Linux --- process tracking (Linux)
- Set up MySQL master and slave servers under Ubuntu 14.04 (Server)
- Linux memory Cache Analysis (Linux)
- BCP importing and exporting large amounts of data Practice (Database)
- RCU lock in the evolution of the Linux kernel (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.