C examples for Data Type:int
If the input is 5, the output runs from 5 to 15.
#include <stdio.h> int main(void) { int input;/* w w w . j av a 2 s. c o m*/ int i = 0; printf("Enter an integer: "); scanf("%d", &input); while (i <= 10) { printf("%d\n", input + i); i++; } return 0; }