0

I just started with programming, so please bear with me. I tried running a simple addition code in C language in Vs Code. It fails to run and no error is displayed. Below is the screenshot of what I see every time I try to run the code

enter image description here

Here is the code I wrote.

#include <stdio.h>

int main () {
   int length, breadth;
   printf("What is the length of the rectangle\n");
   scanf("%d" , &length);

   printf("What is the breadth of the rectangle\n");
   scanf("%d", &breadth);

   printf("The area of your rectangle is %d", length*breadth);
   return 0;
} 
rioV8
  • 24,506
  • 3
  • 32
  • 49
  • Related? https://stackoverflow.com/questions/19458884/why-is-this-trivial-c-program-detected-as-a-virus ... maybe your anti-virus raises a false positive – pmg May 13 '21 at 12:12
  • By convention, success is reported by an exit code of 0. Likewise, by convention, an exit code not equal to 0 represents failure. – IInspectable May 13 '21 at 12:32

1 Answers1

-1

It's probably an issue with how you configured VSCode to run C programs; Try to compile & run the executable separately.

Abdulrahman Ali
  • 603
  • 1
  • 4
  • 15