1

This is my code :

#include <stdio.h>
int main()
{
  int num;
  printf("Enter the Number :");
  scanf("%d",&num);
  printf("\nNumber = %d",num);
  return 0;
}

and when run this code I cant input the number , eventhough I didn't enter any number I get the output

Enter the Number :
Number = 1757380702[Finished in 0.1s]

What should I do for enter the input? Thanks in Advance

LML
  • 1,659
  • 12
  • 29
  • you said " I didn't enter any number I get the output" . If you do not give any number then how program can come out from scanf and and go ahead and exit? – Jeegar Patel Mar 25 '14 at 05:27
  • @Mr.32 that may be the initializtion of num by compiler..I didn't enter anything just show the console output – LML Mar 25 '14 at 05:30

1 Answers1

2

I'm pretty sure Sublime Text just doesn't support that--see this related question. The only Mac text editor that I know for sure will do what you want is Chocolat.

Community
  • 1
  • 1
khagler
  • 3,996
  • 29
  • 40