Skips over first two integers of input - C Language Basics

C examples for Language Basics:scanf

Description

Skips over first two integers of input

Demo Code

#include <stdio.h>
int main(void)
{
    int n;//from w  w  w  . j  a  v a  2 s  .com
    
    printf("Please enter three integers:\n");
    scanf("%*d %*d %d", &n);
    printf("The last integer was %d\n", n);
    
    return 0;
}

Result


Related Tutorials