← The C Language Lesson 3 of 77 · 5 XP

Warm-up: the next number warm-up

Theory and problem statement

Machine translation, not yet reviewed by a native speaker.

To read a number you need a variable and scanf with its address — the & sign before the name:

int n;
scanf("%d", &n);        // read a number into n
printf("%d\n", n * 2);  // printed it doubled

Task. Read an integer and print the next one (one greater).

Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.