Read int value from console : Console Read Int « Console « C / ANSI-C






Read int value from console

  
#include <stdio.h>

main() {
    
    int i = 0;
    int k,j=10;
    
    i=scanf("%d%d%d",&j,&k,&i);
    printf("total values inputted %d\n",i);
    printf("The input values %d %d\n",j,k);

}

           
       








Related examples in the same category

1.Demonstrates how to read a number
2. Read formatted data from stdin: how to use scanf
3.Read unsigned int, long and short from console
4.Add format to scanf
5.Read and write an int value from and to console