well i know i am noob i am trying to learn this
i tryed to do a script that get 10 numbers and printt it from the lowest to the highest
what worng with this script
#include <stdio.h>
#include <conio.h>
void main( )
{
int i, g, z;
int A[10]; // New array with 10 cells non initialized
for (i=0;i<10;i++)
{
scanf ("%d", &g);
A= g ;
}
for (i=0;i<9;i++)
{
if (A[i-1]>A)
A[i-1]=z;
A=A[i-1];
A[i-1]=A;
}
printf("A = %d\n", A) ;
getch();
//return 0;
}
i tryed to do a script that get 10 numbers and printt it from the lowest to the highest
what worng with this script
#include <stdio.h>
#include <conio.h>
void main( )
{
int i, g, z;
int A[10]; // New array with 10 cells non initialized
for (i=0;i<10;i++)
{
scanf ("%d", &g);
A= g ;
}
for (i=0;i<9;i++)
{
if (A[i-1]>A)
A[i-1]=z;
A=A[i-1];
A[i-1]=A;
}
printf("A = %d\n", A) ;
getch();
//return 0;
}


