Read and write an int value from and to console : Console Read Int : Console : C / ANSI-C examples (example source code) Organized by topic

C / ANSI-C
C++
PHP
C / ANSI-C Home »  Console   » [  Console Read Int  ]  Screenshots 
 



Read and write an int value from and to console


#include <stdio.h>

int main(void)
{
  int i;

  scanf("%d", &i);
  printf("%d", i);

  return 0;
}


           
       
Related examples in the same category
1.  Demonstrates how to read a number
2.  Read int value from console
3.   Read formatted data from stdin: how to use scanf
4.  Read unsigned int, long and short from console
5.  Add format to scanf