What is wrong with my program, supposed to print the array's content in descendent order?
Output wanted:
500
400
300
200
100
My code:
#include <stdio.h>
int main() {
int numar[]={100, 200, 300, 400, 500};
int *pnumar;
pnumar=numar;
for (int contor=5;contor>0;contor--)
{
pnumar--;
printf("%d
", *pnumar ) ;
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…