Can anyone explain to me why it’s not running?

Asked

Viewed 80 times

1

#include <stdio.h>
main()
{
    float n1,n2;
    do {
        printf("Informe dois numeos:");
        scanf("%f %f", &n1, &n2);
        if (n1>n2){
          printf("DECRESCENTE"); }
        else {
          printf("CRESCENTE"); }
}
    while (n1!=n2);
     system("pause");

}

Can anyone tell me why it’s not spinning? Of those mistakes

C: Program Files (x86) Dev-Cpp Mingw64 x86_64-W64-mingw32 bin Ld.exe cannot open output file C: Users Andressa Lilja Desktop IF PROGRAMAÇÃO 5.4.exe: Permission denied C: Users Andressa Lilja Desktop IF PROGRAMAÇÃO collect2.exe [Error] Ld returned 1 Exit status

  • How you are compiling the program?

  • Although it doesn’t look very well written, the code is compiling, test here

  • Which compiler are you using ?

1 answer

0

To use the system("pause") you need the stdlib library. h I don’t know what mistake you found there, but from what I’ve seen it is this.

AH, I saw the bug, normally you ran the code, and the window is still open, and you typed it to compile again. You have to finish the program, to run it again, if not give this error there.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.