Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //A simple program to count up to a set number, or set series of numbers.
- #include <stdio.h>
- #include <stdlib.h>
- char input[256];
- int converted_input;
- int count = 1;
- int main()
- {
- printf("\nWhat number would you like to count to? ");
- scanf("%s",input);
- converted_input = atoi(input);
- printf("\n");
- for (count = 1; count != converted_input + 1 ; count++)
- {
- printf("%i\t",count);
- }
- printf("\n");
- main();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement