⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ordenamiento de menor a mayor por burbugeo.cpp

📁 Topics Practices: Programming and Numerical Methods Practice 1: Introduction to C Practice 2
💻 CPP
字号:
#include<stdio.h>
#include<conio.h>

main()
//ordeno de menor a mayor.
{     
      int i,j,aux,n,contar,max,valor,cont;
      printf("Ingrese el tama駉 conjunto de numeros que desea ordenar ");
      scanf("%d",&n);
      int a[n];
      printf("ingrese los numeros del conjunto ");
      for( i=0;i<n;++i)
      scanf("%d",&a[i]);
      
      for(j=0;j<n-1;j=j+1)
        for(i=0;i<n-1;i=i+1)

      if(a[i]>a[i+1])
      {      
             aux=a[i];
             a[i]=a[i+1];
             a[i+1]=aux;
      }
      for(i=0;i<n;++i)
      printf("  %d  \n", a[i]);
      
      printf("PRECIONE CUALQUIER TECLA PARA TERMINAR!!!!!!!");
     

      
getch();

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -