+ 1

Why this code not giving output in my VScode editor?

#include <stdio.h> int main() { int a, b; printf("Enter number a\n"); scanf("%d", &a); printf("Enter number b\n"); scanf("%d", &b); printf("The sum is %d\n", a+b); return 0; }

12th Sep 2021, 11:13 AM
Lalit kumar
Lalit kumar - avatar
4 Respostas
+ 3
Your questions needs further clarification about : 1. How are you compiling your program 2. What input are your providing to it 3. What output you expect from the code 4. What is the actual result program is providing you in return.
12th Sep 2021, 1:25 PM
Arsenic
Arsenic - avatar
+ 1
I don't see anything wrong with it. Just for giggles change %d to %i.
12th Sep 2021, 12:24 PM
William Owens
William Owens - avatar
0
you tagged C# and you posted C code. also VScode is not an IDE, it's an editor, maybe you didn't install the C extension?
12th Sep 2021, 11:37 AM
Rellot's screwdriver
Rellot's screwdriver - avatar
0
I have installed the C/C++ extension but it's not giving desired output
12th Sep 2021, 11:43 AM
Lalit kumar
Lalit kumar - avatar