Learning by doing: Reading books and trying to understand the (code) examples
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

27 lines
284 B

#include <stdio.h>
int main (void) {
int number;
int i;
printf("Give a number: ");
if (scanf("%d", &number) != 1) {
printf("Not a number!\n");
return 1;
}
i = number;
while (i <= number + 10) {
printf("%d ", i++);
}
printf("\n");
return 0;
}