-2
#include <stdio.h>
#include <conio.h>


int main()
{
    float a,b;
    int c;
    printf("Enter Number a\n ");
    scanf("%f",&a);

    printf("Enter num b \n");
    scanf("%f",&b);

    c=a+b;


    printf("The sum is %d",c);  
    
    return 0;
}

The query has now been resolved ,thanks to the community at stack overflow ,I am a beginner in programming and have just started to learn c and didn't knew regarding this but now I have been banned to ask questions

  • If you can run the compiled `.exe` in a terminal and it works fine -- the I would go read the "Code Runner" extension documentation to see if it handles writing to / reading from `stdin` and if so, where it does that. – David C. Rankin Aug 15 '21 at 05:53
  • 1
    header file was found in turbo C/C++ which uses a 16 bit compiler but it is not available in GCC so all the functions like clrscr(),getch(), gets , cgets will also not be available so don’t use it. –  Aug 15 '21 at 05:59

1 Answers1

0

you should change code runner output to the Terminal

go to vscode settings and search code runnrer : run in terminal and check it

video how to do it : https://www.youtube.com/watch?v=Mxao-84mypo

Mustafa_Asaad
  • 86
  • 1
  • 6