C execution problem in sublime text program

49 views Asked by At

I have written this program on sublime text but when i run the program it doesn't give me option for input

I was expecting the software will ask for input I wanted the program to ask for numbers so that i can get their total sum

1

There are 1 answers

0
Moein Arabi On

Sublime text is just an editor. You should install a compiler (e.g gcc) on your system and compile your code by running this command in a shell terminal window:

> gcc -o main main.c

In Windows, this will generate an main.exe file. Then you can run this executable file by running this command at the shell prompt:

> .\main

Or if you are running on a Unix system:

> ./main

Now your program is running and is listening for user input.